I'm mapping data from a MySQL table and have a table that has over 50 columns and over 100,000 rows, and I need to map a column that has data in it which has 4 characters or less.
How can I get a list of all columns in the table which have data that contains only four characters or less? In my case, all columns are varchar(255).
SELECT
COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = <table>
AND CHAR_LENGTH(COLUMN_NAME) <= 4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With