PHP oci_execute for Multiple Statements PHP oci_execute for Multiple Statements oracle oracle

PHP oci_execute for Multiple Statements


Just wrap all statement into anonymous PL/SQL block:

BEGIN    INSERT INTO tbl (id, name) VALUES(1, 'John');    INSERT INTO tbl (id, name) VALUES(2, 'Martha');    INSERT INTO tbl (id, name) VALUES(3, 'Richard');    END;

Oracle doesn't support batch of commands. Anonymous PL/SQL block is executed as single command.