Oracle 的「批次 (batch) 更新」、「批次新增」、「批次删除」语法

Oracle 仍可如 SQL Server、Sybase 数据库,用「分号 (;)」隔离多个 SQL statement,只是 Oracle 前后要再加上 begin、end 关键词,例如:

string strSql = "begin insert into table01(id,name) values(99,'test'); insert into table01(id,name) values(99,'test'); end;";
string strSql = "begin update table01 set name='test2' where id=99; update table01 set name='test2' where id=99; end;";
string strSql = "begin delete from table01 where id=99; delete from table01 where id=19; end;";

因 Oracle 语法较严谨,不能直接在 SQL 语句中,出现「;」等特殊符号。

相关文章:

  • 2021-11-17
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-07-04
  • 2022-01-08
  • 2021-06-10
  • 2021-06-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-02-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案