How to Find Non-Numeric Values in a Column in MySQL

In MySQL, you can run a query like the following to return non-numeric data from the column.

This can be helpful if you ever find a column that contains numeric data, but it was set up as a varchar or char column. You can use this query to find any non-numeric values that might have been inserted into the column. You can then deal with it any way you like, such as convert them to numeric, then change the column type.

Continue reading

PostgreSQL DESCRIBE TABLE Equivalent

Some DBMSs such as Oracle, MySQL, and MariaDB have a DESCRIBE command that returns information about tables and views. It goes DESCRIBE table where table is the name of the table or view, and it can also be followed by a column name if you only want information about a specific column.

PostgreSQL doesn’t have a DESCRIBE TABLE command as such, but there are alternatives.

Continue reading