fix: 修复SqlServerQuery查询表描述乱码,已在SqlServer2017和SqlServer2019版本上面验证通过. (#6439)

https://github.com/baomidou/mybatis-plus/issues/6334
This commit is contained in:
lanjerry 2024-08-26 18:16:31 +08:00 committed by GitHub
parent acbe9a2d80
commit 7b671191c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,7 +29,7 @@ public class SqlServerQuery extends AbstractDbQuery {
@Override @Override
public String tablesSql() { public String tablesSql() {
return "select * from (select cast(so.name as varchar(500)) as TABLE_NAME, " + return "select * from (select cast(so.name as varchar(500)) as TABLE_NAME, " +
"cast(sep.value as varchar(500)) as COMMENTS from sysobjects so " + "cast(sep.value as nvarchar(500)) as COMMENTS from sysobjects so " +
"left JOIN sys.extended_properties sep on sep.major_id=so.id and sep.minor_id=0 " + "left JOIN sys.extended_properties sep on sep.major_id=so.id and sep.minor_id=0 " +
"where (xtype='U' or xtype='v')) a where 1=1 "; "where (xtype='U' or xtype='v')) a where 1=1 ";
} }