Suppose I make a query \"UPDATE table SET etc etc
\"
Then I \"Execute\" this query
if the query is fine, it executes and if the query has errors,
EXPLAIN does the trick if you're running MySQL 5.6 or greater.
explain update whatever;
If the query is ok, it shows the execution plan. Else, it returns the syntax error.
If you're running a lesser version of MySQL, I see a few options:
For instance:
update table set col1 = @val1 where col2 = @val2;
Becomes:
update table set col1 = @val1 where (col2 = @val2) and 1=0;
So, if you're running 5.6 or greater, the EXPLAIN
trick is neat. If not, options 2 and 3 from list are also neat(ish) tricks. But, you should generally be hitting a development server with your in-development queries anyway.