MySql 查询数据库中所有表名
查询数据库中所有表名
select table_name from information_schema.tables where table_schema='csdb' and table_type='base table';
查询指定数据库中指定表的所有字段名column_name
select column_name from information_schema.columns where table_schema='csdb' and table_name='users'
本文介绍如何使用SQL语句查询MySQL数据库中的所有表名及指定表的所有字段名。通过查询information_schema.tables来获取表名,并通过information_schema.columns获取字段名。

2万+

被折叠的 条评论
为什么被折叠?



