Fix “ERROR 1136 (21S01): Column count doesn’t match value count at row 1” when Inserting Data in MariaDB

If you find yourself getting an error that reads something like “ERROR 1136 (21S01): Column count doesn’t match value count at row” in MariaDB, it’s probably because you’ve specified the wrong number of expressions for the number of columns in the column when attempting to insert data into a table.

In other words, you’re trying to insert too many columns or not enough columns.

Continue reading

SQLite JSON_REMOVE()

We can use the SQLite json_remove() function to remove one or more elements from a JSON object or array.

We pass the original JSON as the first argument when we call the function, followed by one or more paths that specify which elements to remove. By “elements”, I mean either array elements or object members (key/value pairs).

Continue reading