Skip to content

Instantly share code, notes, and snippets.

@timabell
Created June 30, 2016 21:17
Show Gist options
  • Select an option

  • Save timabell/efe51298ed3ae4e835f8a61d9de486f8 to your computer and use it in GitHub Desktop.

Select an option

Save timabell/efe51298ed3ae4e835f8a61d9de486f8 to your computer and use it in GitHub Desktop.
declare @prefix varchar = 'MyApp_'
select
tbl.name [table],
col.name [column],
ep.name,
ep.value [value]
from sys.extended_properties ep
inner join sys.objects tbl on tbl.object_id = ep.major_id
left outer join sys.columns col on col.object_id = ep.major_id and col.column_id = ep.minor_id
where ep.name like @prefix + '%'
order by tbl.name, ep.minor_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment