MySQL如何查询表结构及列注释
原创1、有几种方法可以仅显示表结构:
1)show columns from 表名;
2)desc 表名;
3) describe 表名;
2、查询指定的数据库定表 各列的字段如下:
select * from information_schema.columns
where TABLE_SCHEMA = 数据库名称
and TABLE_NAME = 表名称;
3、查询指定的数据库中所有数据有表 各列的字段如下:
select * from information_schema.columns where TABLE_SCHEMA = 数据库名称;
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除