feat: ms_description for tables, upd columns

This commit is contained in:
Pavel
2025-07-30 03:35:01 +02:00
parent c20aec23a2
commit 4f6a3c23ad
4 changed files with 106 additions and 15 deletions

View File

@@ -1,8 +1,14 @@
module.exports = `
select
o.name as pureName, s.name as schemaName, o.object_id as objectId,
o.create_date as createDate, o.modify_date as modifyDate
o.name as pureName,
s.name as schemaName,
o.object_id as objectId,
o.create_date as createDate,
o.modify_date as modifyDate,
ep.value as objectComment
from sys.tables o
inner join sys.schemas s on o.schema_id = s.schema_id
where o.object_id =OBJECT_ID_CONDITION and s.name =SCHEMA_NAME_CONDITION
`;
left join sys.extended_properties ep on ep.major_id = o.object_id
and ep.minor_id = 0
and ep.name = 'MS_Description'
where o.object_id =OBJECT_ID_CONDITION and s.name =SCHEMA_NAME_CONDITION`;