mysql if where code example
Example 1: mysql if else
IF condition THEN
statements;
ELSE
else-statements;
END IF;
Example 2: mysql if statement in where clause
SELECT `id` , `naam`
FROM `klanten`
WHERE IF(`email` != '', `email`, `email2`) LIKE '%@domain.nl%'