mysql 常用命令行

查询某库某表的表结构及列注释

select * from information_schema.columns where table_schema ='库名'
and table_name = '表名' ;

例子:

简化使用版本(查询某库某表的表结构及列注释)

select TABLE_NAME,COLUMN_NAME,DATA_TYPE,COLUMN_COMMENT from information_schema.columns where table_schema ='cpu_bid_project'
and table_name = 'cpu_bid_pjt_section';

猜你喜欢

转载自blog.csdn.net/zy103118/article/details/84529412