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
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