SQL IF THEN : Learn the Various Forms the IF-THEN Statement
Note that the conditionals, and other statements, are written in all caps, in SQL. With the IF statement, we first check a condition. If it evaluates to true, the statement associated with THEN is executed. Otherwise, program control goes to the next statement of the program. Take a look at the following example.
DA: 57 PA: 77 MOZ Rank: 93