diff --git a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs index 7cfbacad8..c5dfb8e02 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/SugarProvider/SqlSugarProvider.cs @@ -1053,7 +1053,16 @@ namespace SqlSugar addParameters.Add(parameter); } parsmeters.AddRange(addParameters); - itemSql = itemSql.TrimEnd(';') + ";"; + itemSql = itemSql + .TrimEnd('\r') + .TrimEnd('\n') + .TrimEnd('\r') + .TrimEnd('\n') + .TrimEnd(';') + ";"; + if (itemSql == "begin;") + { + itemSql = itemSql.TrimEnd(';') + "\n"; + } sqlBuilder.AppendLine(itemSql); index++; }