如果遇到沒建關聯表時,可下此語法查出相同欄位名稱所在的資料表
Ver-2008
select a.name,a.object_id,b.name,b.object_id from sys.tables a
left join sys.all_columns b on a.object_id =b.object_id
where b.name ='ap_seq'
Ver-2000,2005
select a.name,a.id,b.name,b.id from sysobjects a
left join syscolumns b on a.id =b.id
where b.name ='ap_seq'
僅供參考
沒有留言:
張貼留言