brauniks / memy

0 stars 0 forks source link

copy #2

Open brauniks opened 5 months ago

brauniks commented 5 months ago

SELECT schemas.name AS SchemaName, tables.name AS TableName, extended_properties.name AS PropertyName, extended_properties.value AS PropertyValue FROM sys.extended_properties INNER JOIN sys.tables ON extended_properties.major_id = tables.object_id INNER JOIN sys.schemas ON tables.schema_id = schemas.schema_id WHERE extended_properties.minor_id = 0 AND extended_properties.class = 1 ORDER BY schemas.name, tables.name, extended_properties.name;