diff --git a/packages/dbml-connector/src/connectors/mssqlConnector.ts b/packages/dbml-connector/src/connectors/mssqlConnector.ts index 33b1e5de..1ee3921b 100644 --- a/packages/dbml-connector/src/connectors/mssqlConnector.ts +++ b/packages/dbml-connector/src/connectors/mssqlConnector.ts @@ -203,7 +203,7 @@ const generateTablesFieldsAndEnums = async (client: sql.ConnectionPool, schemas: JOIN sys.columns c ON t.object_id = c.object_id JOIN sys.types ty ON c.user_type_id = ty.user_type_id LEFT JOIN sys.extended_properties p ON p.major_id = t.object_id - AND p.name = 'MS_Description' + AND p.name = 'MS_Description_Table' AND p.minor_id = 0 -- Ensure minor_id is 0 for table comments LEFT JOIN sys.extended_properties ep ON ep.major_id = c.object_id AND ep.minor_id = c.column_id