Update SqlServerBuilder

This commit is contained in:
sunkaixuan 2023-05-31 23:28:20 +08:00
parent ccd0e38fba
commit 75c1a5a08b

View File

@ -14,7 +14,7 @@ namespace SqlSugar
public override string RemoveParentheses(string sql)
{
if (sql.Contains("ORDER BY")&&!sql.StartsWith("(SELECT TOP 1"))
if (sql.Contains("ORDER BY")&&!sql.StartsWith("(SELECT TOP 1")&&!sql.Contains("(SELECT TOP 1000000"))
{
sql = $"SELECT * FROM {sql.Replace("(SELECT ", "(SELECT TOP 1000000")} TEMP";
}