請參考以下指令
select
co.Column_Name,co.data_type,co.character_maximum_length,
sep.value [Description]
from sys.tables st
inner join sys.columns sc on st.object_id = sc.object_id
left join INFORMATION_SCHEMA.COLUMNS co on st.name = co.table_name
left join sys.extended_properties sep on st.object_id = sep.major_id
and sc.column_id = sep.minor_id
and sep.name = 'MS_Description'
沒有留言:
張貼留言