1、简单描述表结构和字段类型
mysql> desc homestead.student;

显示表结构,字段类型,主键,是否为空等属性,但不显示外键。
2、查询表中列的注释信息
select * from information_schema.columns where table_schema='homestead' and table_name='t1';

3、查看表生成的DDL
mysql> show create table homestead.t1;

mysql> desc homestead.student;
显示表结构,字段类型,主键,是否为空等属性,但不显示外键。
2、查询表中列的注释信息
select * from information_schema.columns where table_schema='homestead' and table_name='t1';
3、查看表生成的DDL
mysql> show create table homestead.t1;
本文标题:MySQL查看表结构
本文链接:https://www.haomeiwen.com/subject/olzwpqtx.html
网友评论