SqlServer
查找某数据库中所有的字段
SELECT s.name,s.id,t.TABLE_NAME FROM SYSCOLUMNS s ,INFORMATION_SCHEMA.TABLES t WHERE s.id = OBJECT_ID(t.TABLE_NAME) and t.TABLE_CATALOG = '数据库名'
and s.name = '字段名' order by TABLE_NAME
2021-12-10 06:51:44
SqlServer
查找某数据库中所有的字段
SELECT s.name,s.id,t.TABLE_NAME FROM SYSCOLUMNS s ,INFORMATION_SCHEMA.TABLES t WHERE s.id = OBJECT_ID(t.TABLE_NAME) and t.TABLE_CATALOG = '数据库名'
and s.name = '字段名' order by TABLE_NAME