Browse Source

Update Subquery.OrderBy.ToList

pull/30/head
sunkaixuan 2 years ago
parent
commit
88afc71378
  1. 10
      Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerBuilder.cs

10
Src/Asp.Net/SqlSugar/Realization/SqlServer/SqlBuilder/SqlServerBuilder.cs

@ -11,5 +11,15 @@ namespace SqlSugar
{
public override string SqlTranslationLeft { get { return "["; } }
public override string SqlTranslationRight { get { return "]"; } }
public override string RemoveParentheses(string sql)
{
if (sql.Contains("ORDER BY"))
{
sql = $"SELECT * FROM {sql.Replace("(SELECT ", "(SELECT TOP 1000000")} TEMP";
}
return sql;
}
}
}

Loading…
Cancel
Save