Articles tagged in: MySQL



MySQL — Order By Columns Whichever is Not Null

MySQL is flexible in the data model and allows you to have nullable columns. For example, you’re using NULL as the default date-time value until a given action happens. When displaying the data you may want to apply a specific sorting. But if the sorting column allows NULL values, …

Continue Reading

MySQL — Rename a Column

An application in production evolves by adding new features. You may also detect inconsistencies from previous developments that you want to improve, such as the naming in your database schema or adjustments in casing. You can rename columns in MySQL easily and this tutorial shows you how. {{outline}} MySQL 8. …

Continue Reading

MySQL — Fixing Invalid JSON Text in Argument 1 to Function json_extract: "Invalid value."

We’re using MySQL as the relational data store in most of our projects. MySQL is a solid foundation, even with complex data types, like JSON. Sometimes we’re integrating apps with external APIs. We typically store responses from external services when requesting from them or synchronizing data with them. …

Continue Reading

MySQL — Get Weekday From Date

Storing and working with dates in the database is a common use case. You’re storing data and want to keep a reference of the creation date or when an update happens. MySQL comes with dozens of date and time functions. It facilitates your work when filtering or grouping rows …

Continue Reading

MySQL — Group Ranges Into Buckets

We’re working on a running project and want to calculate statistics. For example, how many 10k runs happened during the competition? Or how many half-marathons and marathons did people run? Runners in the event use Strava to track their activities. We’re using Strava webhooks to process and store …

Continue Reading
Page 1 of 2

Explore the Library

Find interesting tutorials and solutions for your problems.