Can you put multiple statements in one query-string in Oracle jdbc?
I have a JDBC connection to an Oracle database. I create a Statement. The SQL query String contains multiple statements separated by a semicolon, and is provided by a different system.
connection.prepareStatement("SELECT * FROM A; SELECT * FROM B");
According to ddimitrov it isn't possible.
But all other databases I've tried support it. And JDBC even has support to retrieve multiple results.
Does anyone have either pointers to Oracle documentation explicitly stating that it is not supported or have a way to make it work (without using of stored procedures)?
For executing multiple statements:
JDBC 2.0 lets you submit multiple statements at one time with the addBatch method