查询MySQL某库所有表名和字段名

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

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

posted on 2018-12-10 10:39  wmlg  阅读(406)  评论(0)    收藏  举报

导航