
sql server查询数据库中所有表名,查询表中所有字段名
sql server: 1.查询数据库中所有表名称:
select table_name from information_schema.tables where TABLE_CATALOG=‘数据库名称’;(包含视图)
select table_name from information_schema.tables where TABLE_CATALOG=‘数据库名称’ and table_type = ‘BASE TABLE’
2.查询每张表中所有字段名:
select COLUMN_NAME from INFORMATION_SCHEMA.Columns where table_name=‘表名称’ and TABLE_CATALOG=‘数据库名称’;
👁️ 阅读量:0
© 版权声明:本文《sql server查询数据库中所有表名,查询表中所有字段名》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686654163a317441.html。