1、查看标的创建语句

SHOW CREATE TABLE table_name;

在sqlyog中查看mysql的表结构

2、简单查看表结构

DESC table_name;

在sqlyog中查看mysql的表结构


3、查询表结构详细信息——包括列注释

select * from information_schema.columns where table_schema = 'db'  #表所在数据库
and table_name = 'tablename' ; #你要查的表
4、查询表结构部分详细信息——包括列注释
select  column_name,
column_comment from information_schema.columns where table_schema ='db' and
table_name = 'tablename' ;

在sqlyog中查看mysql的表结构

5、查看表的信息

select table_name,table_comment from information_schema.tables  where table_schema = 'db' and table_name ='tablename'
在sqlyog中查看mysql的表结构




相关文章:

  • 2022-12-23
  • 2022-02-20
  • 2022-02-09
  • 2021-12-23
  • 2022-02-14
  • 2022-01-16
  • 2022-02-11
猜你喜欢
  • 2021-11-17
  • 2022-01-05
  • 2021-11-26
  • 2021-12-21
  • 2021-11-22
  • 2022-12-23
相关资源
相似解决方案