How can i get mySql column Length/Values

mysql

Solution

SQL has a LEN() Function. Which will give you a length of a field. However updated would be the solution:

UPDATED

SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'Database' AND TABLE_NAME = 'Table' AND COLUMN_NAME = 'Field'

Hope that helps

Problem

I can get column table information with this command, but that don't return column `Length/Values`, how can i get that? ``` SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tableName' ```

Original source

Related problems