Update Oracle

This commit is contained in:
sunkaixuan
2025-11-02 11:06:35 +08:00
parent 8efcb859e6
commit a88188383b

View File

@@ -106,6 +106,11 @@ namespace SqlSugar
result = $" {sql.ToString()} {(this.WhereInfos.Any()?"AND":"WHERE")} ROWNUM = 1 "; result = $" {sql.ToString()} {(this.WhereInfos.Any()?"AND":"WHERE")} ROWNUM = 1 ";
result = result.Replace(rowNumberString, " "); result = result.Replace(rowNumberString, " ");
} }
if (!string.IsNullOrEmpty(this.TranLock)&&this.GetGroupByString == null && this.Take >1 && this.Skip == null && oldOrderBy == null)
{
result = $" {sql.ToString()} {(this.WhereInfos.Any() ? "AND" : "WHERE")} ROWNUM <= {this.Take} ";
result = result.Replace(rowNumberString, " ");
}
if (ExternalPageIndex > 0) if (ExternalPageIndex > 0)
{ {
if (externalOrderBy.IsNullOrEmpty()) if (externalOrderBy.IsNullOrEmpty())