Update oracle

This commit is contained in:
sunkaixuan 2023-11-02 14:37:07 +08:00
parent 4f359c121b
commit 2398274b51

View File

@ -87,7 +87,7 @@ namespace SqlSugar
sql.Replace(UtilConstants.ReplaceKey, isRowNumber ? (isIgnoreOrderBy ? null : rowNumberString) : null);
if (isIgnoreOrderBy) { this.OrderByValue = oldOrderBy; return sql.ToString(); }
var result = ToPageSql(sql.ToString(), this.Take, this.Skip);
if (this.Take == 1 && this.Skip == 0&&oldOrderBy== "ORDER BY sysdate ")
if (this.GetGroupByString==null&&this.Take == 1 && this.Skip == 0&&oldOrderBy== "ORDER BY sysdate ")
{
result = $" {sql.ToString()} {(this.WhereInfos.Any()?"AND":"WHERE")} ROWNUM = 1 ";
}