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

One of the more common error message in MySQL goes like this: “ERROR 1136 (21S01): Column count doesn’t match value count at row 1“.

This error typically occurs when you’re trying to insert data into a table, but the number of columns that you’re trying to insert don’t match the number of columns in the table.

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

Continue reading

Fix Error “ORA-01789: query block has incorrect number of result columns”

If you’re getting the error “ORA-01789: query block has incorrect number of result columns” in Oracle Database, then it’s probably because you’re trying to use an operator such as UNION, INTERSECT, or EXCEPT to run a compound query, but the SELECT statements on either side of the operator return a different number of columns.

To fix this, simply ensure that both queries return the same number of columns.

Continue reading