@Test
public void multiQueryTest() throws SQLException
{
Connection c = DriverManager.getConnection("jdbc:h2:mem:a", "sa", "sa");
Statement s = c.createStatement();
s.execute("CREATE TABLE t(k VARCHAR(50), v VARCHAR(50))");
s.execute("INSERT INTO t VALUES ('a','b');INSERT INTO t VALUES ('a','b');");
ResultSets.print(s.executeQuery("select * from t"));
}
OUTPUT:
*+---+---+
| K | V |
+---+---+
| a | b |
| a | b |
+---+---+*
Works for me. 1.4.181
在 2015年4月24日星期五 UTC+8上午2:36:20,hala写道:
>
> i want to know if h2database allow multiple queries like the case in mysql?
>
> String dbUrl = "jdbc:mysql:///test?allowMultiQueries=true";
>
> thanks
>
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.