I have in a variable DDL and DML queries.
example:
var1='insert into tb1 (id) values(1); insert into tb1 (id) values(2); insert into tb1 (id) values(3);'
I want to execute the var1 that contains several inserts. how to do that? execute immediate didnt worked.
Edit: I tryd this , It didnt work because there is ';' inside it.
DECLARE COL_COUNT NUMBER;
BEGIN
EXECUTE IMMEDIATE ('insert into ex_employee (id) values (3); insert into ex_employee (id) values (4);');
END;
/