How can i get mySql column Length/Values

前端 未结 3 1314
一生所求
一生所求 2021-01-25 04:30

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         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-25 05:05

    Please check if COLUMN_TYPE is what you are looking for.

    SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'tableName';
    

    Also, you may refer all the columns in INFORMATION_SCHEMA.COLUMNS table and query data that might be useful to you.

提交回复
热议问题