I have been looking at this for a while and i can't find the syntax error.
IF EXISTS (SELECT * FROM ElpasoTable WHERE elapsoCommand = 'shouldRunWlapon')
BEGIN
END
I have been looking at this for a while and i can't find the syntax error.
IF EXISTS (SELECT * FROM ElpasoTable WHERE elapsoCommand = 'shouldRunWlapon')
BEGIN
END
Try this for MySQL
IF EXISTS (SELECT * FROM ElpasoTable WHERE elapsoCommand = 'shouldRunWlapon') THEN
---- YOUR CODE HERE
END IF;
Valid commands..
DROP TABLE IF EXISTS...
,CREATE TABLE IF NOT EXISTS..
You cannot use IF EXISTS
simply in a mysql command.
for your need you can try this instead
perfect solution for your case
Actually I don't know what output u want but here is the suggestion. We can't use directly if exists statement. We can use it after certain commands such as delete ,update ,Create etc. First if u want the desired output,remove if exists. So the query will be ( SELECT * FROM ElpasoTable WHERE elapsoCommand = 'shouldRunWlapon') If ur table has column named elapsocommand and value is shouldRunWlapon,,then the Elapsocommand table is displayed.
U can use some concepts between begin and end statements based on ur requirement. They are stored procedures , triggers, views etc