There was an error while loading. Please reload this page.
IF ... THEN ... ELSE
Syntax:
IF expression THEN statement1 [ELSE statement2]
For example:
IF EXISTS(SELECT * FROM one WHERE a=10) UPDATE one SET b = 200 WHERE a=10 ELSE INSERT INTO one VALUES (5,500);
Try this AlaSQL example in jsFiddle.
See also: CASE
Quick links
AlaSQL wiki frontpage
About AlaSQL
Install AlaSQL
Get started with AlaSQL