Bug #54055 | IF ELSE syntax error | ||
---|---|---|---|
Submitted: | 28 May 2010 6:21 | Modified: | 28 May 2010 8:06 |
Reporter: | Alex Shapiro | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Workbench: SQL Editor | Severity: | S3 (Non-critical) |
Version: | 5.2.21 | OS: | Windows (Vista) |
Assigned to: | CPU Architecture: | Any | |
Tags: | compiling, editor, ELSE, IF, if else, ifelse, MySQL, syntax, workbench |
[28 May 2010 6:21]
Alex Shapiro
[28 May 2010 6:46]
Alex Shapiro
I avoided this problem by not using the ELSE IF statement: IF number > 0 THEN RETURN 'return something'; END IF; IF another_number > 0 THEN RETURN 'something else'; END IF;
[28 May 2010 8:06]
Susanne Ebrecht
http://dev.mysql.com/doc/refman/5.1/de/if-statement.html IF search_condition THEN statement_list [ELSEIF search_condition THEN statement_list] ... [ELSE statement_list] END IF The correct syntax would be "elsif" and not "else if"