首页 > 数据库技术 > 详细

mysql 查询表结构

时间:2020-05-25 12:46:03      阅读:41      评论:0      收藏:0      [点我收藏+]

查看表中字段的结构信息 

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

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 查询表结构

原文:https://www.cnblogs.com/zhang-wenbin/p/12956091.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!