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';orm

相關文章
相關標籤/搜索