Query not running
Posted: Thu Dec 30, 2010 4:00 am
Hi guys,
I am trying to run a MYSQL query having conditional statement, but it continuously showing me a error, please help me to come out.
QUERY:
I am trying to run a MYSQL query having conditional statement, but it continuously showing me a error, please help me to come out.
QUERY:
ERROR:IF 1 > 0 THEN
SELECT * FROM table1;
ELSE
SELECT * FROM table2;
END IF;
Thanks#1064 - 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 'IF 1 > 0 THEN
SELECT * FROM table1' at line 1