I was wondering: Is it possible to use an IF statement inside a WHERE clause for a SELECT? Here's a sample:
SELECT var1, var2, .. AS name
FROM table1 C, table2 F, table3 D,..
WHERE C.id = f.id, AND ..
AND (IF expression THEN F.num <0; -- <-- is this possible?
ELSE F.num >0);
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire