Select Extended Property from SQL Server tables

后端 未结 2 1844
栀梦
栀梦 2021-01-19 15:01

I am writing a simple CMS for a client\'s database. There are 12 tables and they need to manage all of the data in 4 of them.

I set up a dynamic data project (Linq-

2条回答
  •  孤独总比滥情好
    2021-01-19 15:24

      SELECT major_id, minor_id, t.name AS [Table], c.name AS [Column], value AS [Extended Property]
      FROM sys.extended_properties AS ep
      INNER JOIN sys.tables AS t ON ep.major_id = t.object_id 
      INNER JOIN sys.columns AS c ON ep.major_id = c.object_id AND ep.minor_id = c.column_id
      WHERE class = 1 order by t.name; 
    

    This work for me...

提交回复
热议问题