gpt4 book ai didi

c# - 在 SQL Server 中获取表描述

转载 作者:太空宇宙 更新时间:2023-11-03 23:32:30 24 4
gpt4 key购买 nike

<分区>

我只想获取表的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 作为参数谢谢

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com