mysql - 查看表结构命令
时间:2021-03-10 12:59:11
收藏:0
阅读:0
-- 查看表结构
desc 表名;
-- 查看表中字段的结构信息
select table_name,column_name,column_comment from information_schema.columns where table_schema =‘表所在的库‘ and table_name = ‘要查的表‘;
-- 查看库里面表的结构信息
select table_name,table_comment from information_schema.tables where table_schema = ‘表所在的库‘ and table_name =‘要查的表‘;
-- 查看表的DDL语句
show create table 表名;
评论(0)