当前位置:Gxlcms > 数据库问题 > mysql 查询表结构

mysql 查询表结构

时间:2021-07-01 10:21:17 帮助过:1人阅读

查看表中字段的结构信息 

  可以用来查看表中字段的注释等,比如

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 =‘表名‘ ;

  去掉 table_name 限定条件,即可查看指定库中的所有表信息

技术图片

 

mysql 查询表结构

标签:mic   sch   table   image   comm   条件   where   column   表名   

人气教程排行