1. 程式人生 > >T-SQL實用查詢之查詢字段所屬的數據庫表

T-SQL實用查詢之查詢字段所屬的數據庫表

type -s 實用 pan and bject 查詢 column inner

SELECT b.name as TableName,a.name as columnname
From syscolumns a
INNER JOIN sysobjects b ON a.id=b.id
where b.type=U
AND a.name=destid

T-SQL實用查詢之查詢字段所屬的數據庫表