Created
October 11, 2011 05:23
-
-
Save mnzk/1277349 to your computer and use it in GitHub Desktop.
t-sql カラム説明表示
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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