云乐国鑫

MySQL查询数据库中表名或字段名

查询数据库中所有表名
select table_name from information_schema.tables where table_schema='csdb' and table_type='base table';

查询指定数据库中指定表的所有字段名
select column_name from information_schema.columns where table_schema='csdb' and table_name='users';

posted @ 2018-01-08 11:13  国鑫  阅读(3159)  评论(0编辑  收藏  举报
版权所有@snzigod