SQL Server / T-SQL / Table Extended Properties
The extended properties of a database object are stored in the underlying data layer of SQL Server. Do you like to know how you can retrieve these extended properties?
12/13/20231 min read


SQL Server / T-SQL / Table Extended Properties
select
EP.major_id
, T.name as TableName
, EP.minor_id
, C.column_id as ColumnNr
, C.name as ColumnName
, EP.value
from sys.extended_properties EP
inner join sys.tables T on T.object_id=EP.major_id
left outer join sys.columns C on C.object_id=T.object_id and C.column_id=EP.minor_id