查询mysql某张表中的所有数据(字段)类型

select DATA_TYPE from information_schema.COLUMNS where TABLE_NAME='表名';





select DATA_TYPE from information_schema.COLUMNS

where TABLE_SCHEMA='数据库名'

and TABLE_NAME='表明'

and column_name = '字段名';


select COLUMN_NAME,DATA_TYPE,COLUMN_COMMENT from information_schema.COLUMNS where table_name = '表名' and table_schema = '数据库名称';



猜你喜欢

转载自blog.csdn.net/qq_36666181/article/details/80520322