Skip to content

Instantly share code, notes, and snippets.

@mnzk
Created October 11, 2011 05:23
Show Gist options
  • Save mnzk/1277349 to your computer and use it in GitHub Desktop.
Save mnzk/1277349 to your computer and use it in GitHub Desktop.
t-sql カラム説明表示
select
sys.tables.name as table_name,
sys.extended_properties.value as discription,
sys.columns.name as column_name,
sys.columns.*
from sys.columns
left outer join sys.tables on (sys.columns.object_id=sys.tables.object_id)
left outer join sys.extended_properties on (major_id=sys.columns.object_id and minor_id=sys.columns.column_id)
where sys.tables.name is not null
order by table_name, sys.columns.column_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment