MySQL Forums
Forum List  »  Stored Procedures

Simple Nested IF Syntax Error
Posted by: Jian Jin
Date: February 23, 2019 08:13PM

I'm creating a stored procedure on MySQL community windows version 5.7.21. The source and a syntax error are below. I'm stuck here and cannot find solutions for days, anyone can help? Thanks in advance.

[Err] 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 '' at line 7

DROP PROCEDURE IF EXISTS SP1;
CREATE PROCEDURE SP1()
BEGIN
IF (SELECT TRUE) THEN
IF (TRUE) THEN
SET @s = 1;
END IF;
END IF;
END

Options: ReplyQuote


Subject
Views
Written By
Posted
Simple Nested IF Syntax Error
1248
February 23, 2019 08:13PM
341
February 23, 2019 09:05PM
343
February 23, 2019 09:38PM
363
February 23, 2019 11:40PM
335
February 24, 2019 05:29AM
355
February 24, 2019 12:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.