Question

I user the java.sql.Statement.excecuteUpdate method to create a table and insert some values into the database through JDBC. However, it gives me MySQL syntax exceptions for no reason. I copied and pasted the same code into command prompt. it worked.

I'm wondering why it's doing that??

Was it helpful?

Solution

Guessing

You cannot do a query like: insert ...; insert ... ; only one query per method call

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top