From cfd8e04eb1e0fc6cfdfa436321bbbcbc159c96db Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Sat, 26 Sep 2020 13:45:18 +0800 Subject: [PATCH] Update Oracle Insertable --- .../Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs index 7188d5883..1590f9efb 100644 --- a/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs +++ b/Src/Asp.Net/SqlSugar/Realization/Oracle/SqlBuilder/OracleInsertBuilder.cs @@ -87,7 +87,14 @@ namespace SqlSugar batchInsetrSql.AppendLine(") "); } - batchInsetrSql.AppendLine("SELECT 1 FROM DUAL"); + if (identities.HasValue()) + { + batchInsetrSql.AppendLine("SELECT "+ (this.OracleSeqInfoList.First().Value-1) + " FROM DUAL"); + } + else + { + batchInsetrSql.AppendLine("SELECT 1 FROM DUAL"); + } var result= batchInsetrSql.ToString(); return result; }