Browse Source

Update sqlserver first distinct

pull/33/head
sunkaixuan 1 year ago
parent
commit
d583fd8352
  1. 4
      Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerQueryBuilder.cs

4
Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerQueryBuilder.cs

@ -104,6 +104,10 @@ namespace SqlSugar
this.OldSql += this.Offset;
}
result = GetSqlQuerySql(result);
if (isFirst && IsDistinct)
{
result = result.Replace("TOP 1 DISTINCT", "TOP 1 ");
}
return result;
}

Loading…
Cancel
Save