MySQL元数据查询

查询数据库中所有表名

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元数据查询

上一篇:MySql 联合查询


下一篇:MySql常见的函数