This content has been marked as final. Show 2 replies
To execute multiple statements at once, you'd need to enclose them in an anonymous PLSQL block by wrapping it in begin .. end; and separating statements with a semi colon. ie,
begin update mytable set col1 = 1 where something; update myothertable set col2=5 where something else; update yetanothertable set col3 = 'a'; end;
However, your dba may yell at you for passing literals like that as not only does the block have to be parsed, each statement within it does.
If you want to execute the same statement multiple times but provide all the values up front, you'll want to look into the ODP array binding feature.. http://download.oracle.com/docs/html/B10961_01/features.htm#1025579
hope it helps,