0

Using the "Execute SQL" feature of the mysql addin for virtualmin, what is the syntax for executing multiple statements? For example if I want to do:

delete from Table1;
delete from Table2;

I get the following error:

Failed to execute SQL : SQL delete from Table1; delete from Table2; failed : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'delete from Table2' at line 1

  • I assume this works successfully if you only supply a single statement? – Chris Montanaro Jan 23 '14 at 17:49
  • yes, it works fine on single statements. I suspect there's just some tricky syntax for multiple, batch-style, statements. – tenfour Jan 23 '14 at 17:50
1

Save your statements to a .sql file and select "Run SQL from file", you will be prompted to upload the SQL file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.