3

I have the below queries and i can run them one by one successfully,

Delete from eventor.user_role ;
Delete FROM eventor.role ;
delete from eventor.user ;

but when i run all of them together, it complains with the error:

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 eventor.role ;

This is a surprise for me since, i can run the

 Delete FROM eventor.role ;

successfully, and i have terminated all the queries using ;.

So, why am i getting this, and how can i fix it?

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
Jeff
  • 7,767
  • 28
  • 85
  • 138

2 Answers2

3
  • From File, choose Options, then General
  • Check **';' Statement separator
jnovack
  • 7,629
  • 2
  • 26
  • 40
Mohammed Deifallah
  • 1,290
  • 1
  • 10
  • 25
1

According to http://www.aquafold.com/support_faq#commands:

Q: Scripts with multiple statements return errors, while each statement can be executed individually without errors.

Example:

select * from t1 select * from t2 select * from t3

This script returns errors.

Aqua Data Studio uses “go” or “/” symbols as line separators between statements.
Here is a corrected example of the same script:

select * from t1
/
select * from t2
/
select * from t3

or

select * from t1
go
select * from t2
go
select * from t3
go

Try using go or / instead of ;

Ezenhis
  • 997
  • 9
  • 14