热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_39472101
指尖‖舞者
6 年前
trueweixin_39472101

MySQL 查询一个数据库中有多少表 以及表名称:
select distinct table_name from information_schema.columns where table_schema = 'oop';

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
MySQL 数据库查询字段名称、字段解释、中文名称、表名称、表注释等SELECT case when locate('_',column_name) >0 then concat(lower(left(column_name,locate('_',column_name)-1)),upper(substring(column_name,locate('_',column_name)+1,1)),lower(substring(column_name,locate('_',column_name)+2))) else lower(column_name) end as column_name, data_type, column_comment, table_name, (select table_comment from information_schema.tables where table_schema='oop'and table_name = information_schema.columns.table_name ) as table_commentFROM information_schema.columns WHERE table_name in (select distinct table_name from information_schema.columns where table_schema = 'oop')ORDER BY ORDINAL_POSITION,table_name;
立即登录