How to get the mysql table columns data type?

后端 未结 11 722
独厮守ぢ
独厮守ぢ 2020-12-02 06:23

I want to get the column data type of a mysql table.

Thought I could use MYSQLFIELD structure but it was enumerated field types.

Then I tried wi

11条回答
  •  执念已碎
    2020-12-02 06:26

    Please use the below mysql query.

    SELECT COLUMN_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH 
    FROM information_schema.columns 
    WHERE table_schema = '' 
    AND table_name = '' 
    AND COLUMN_NAME = '' 
    
    
    

    提交回复
    热议问题