select a.name 來(lái)源名稱,b.text 代碼內(nèi)容, case when a.xtype='V' then '視圖' when a.xtype='P' then '存儲(chǔ)過(guò)程' when a.xtype='FN' then '標(biāo)量函數(shù)' when a.xtype='TF' then '表函數(shù)' when a.xtype='TR' then '觸發(fā)器' else a.xtype end 類型 from sysobjects a inner join syscomments b on a.ID=b.ID where b.text like '%需要查詢的表%' order by 類型
|
|