首页 > 数据库技术 > 详细

MySQL元数据查询

时间:2020-04-07 19:25:46      阅读:59      评论:0      收藏:0      [点我收藏+]

查询数据库中所有表名

show tables;
# 也可以
select table_name from information_schema.tables where table_schema=‘xpydw‘ and table_type=‘base table‘;

查询指定数据库中指定表的所有字段名column_name

select column_name from information_schema.columns where table_schema=‘xpydw‘ and table_name=‘users‘

MySQL元数据查询

原文:https://www.cnblogs.com/hupingzhi/p/12654937.html

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