나는 단순히 MS_Description
테이블 을 얻고 싶다.
지금은 열에 만 있습니다.
select
sc.name,
sep.value [Description]
from sys.tables st
inner join sys.columns sc on st.object_id = sc.object_id
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'
where st.name =@TableName
나는 또한 매개 변수로 @TableName을 가지고 있습니다.
이것을 시도하십시오-기본적으로를 사용하여 minor_id = 0
테이블의 설명을 가져옵니다 (열이 아님).
SELECT
t.Name,
sep.*
FROM
sys.tables t
INNER JOIN
sys.extended_properties sep ON t.object_id = sep.major_id
where
sep.Name = 'MS_Description'
AND sep.minor_id = 0 -- not any column - but the table's description
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다