SqlServer查詢字段屬於哪個表


use TopwoxLimsYTG --數據庫名稱
go
SELECT
     表名       = D.name ,
     字段序號   = A.colorder,
     字段名     = A.name,
     類型       = B.name,
     字段說明=isnull(g.[value],'')
 FROM syscolumns A 
 LEFT JOIN systypes B ON A.xusertype=B.xusertype
 INNER JOIN sysobjects D ON A.id=D.id  and D.xtype='U' and  D.name<>'dtproperties'
 LEFT JOIN sys.extended_properties G ON a.id=g.major_id   and   a.colid=g.minor_id    
     WHERE A.name= 'IsFlatAccount'--字段名

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM