0
点赞
收藏
分享

微信扫一扫

mysql 查询表结构||查询数据库中所有的表名


查询数据库中所有的表名

select table_name from information_schema.tables where table_schema='当前数据库'

mysql 查询所有表结构

select
*
FROM INFORMATION_SCHEMA.COLUMNS
where table_name = 'app_api'

查询某个数据库中的某个表的所有字段信息及备注

select * from information_schema.columns
where table_schema = 'nocode' #表所在数据库
and table_name = 'man' ; #你要查的表

查询所有表注释

SELECT
table_name 表名,
table_comment 表说明
FROM
information_schema.TABLES
WHERE
table_schema = '数据库名'
ORDER BY
table_name

查询指定表的信息备注

select *
from tables
where table_schema = 'nocode'
and table_name = 'man';


举报

相关推荐

0 条评论