Here are three options for returning rows that contain lowercase characters in MySQL.
MySQL
2 Ways to Return Rows that Contain Alphanumeric Characters in MySQL
Below are two options for finding those rows that contain alphanumeric characters in MySQL.
Alphanumeric characters are alphabetic characters and numeric characters.
Fix MySQL Warning 1287: ‘BINARY expr’ is deprecated and will be removed in a future release
If you get warning number 1287 that reads ‘BINARY expr’ is deprecated and will be removed in a future release. Please use CAST instead when running a query in MySQL, it’s because you’re using the BINARY operator.
The BINARY operator is deprecated as of MySQL 8.0.27.
To fix the issue, cast the value to binary using the CAST() function instead.
How to Detect if a Value Contains at Least One Numerical Digit in MySQL
If you need to return all rows that contain at least one numerical digit in MySQL, the following example might come in handy.
2 Ways to List all Functions in MySQL
Below are two options we can use to return a list of functions in MySQL.
How to Check a Column’s Data Type in SQL
In SQL, the columns information schema view, which returns information about columns, is an ISO standard view that is supported by most of the major RDBMSs. You can use this view to get information about a column’s data type.
Most of the major RDBMs also provide other methods for getting column information.
Here are examples of getting the data type of a column in various SQL databases.
SCHEMA() Function in MySQL
In MySQL, the SCHEMA() function is a synonym for the DATABASE() function. It returns the default (current) database name.
The result is returned as a string in the utf8 character set. If there is no default database, it returns NULL.
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.
4 Ways to Check a Column’s Data Type in MySQL
Here are four ways to get the data type of a column in MySQL.
How to Format Numbers with Commas in SQL
Most of the major RDBMSs have functions that enable us to format numbers with commas as either the group separator, or the decimal separator.
Some RDBMSs also output certain numeric data types with commas in the relevant place.
Below are examples of formatting numbers with commas in some of the more popular DBMSs.