3
I am developing an SQL query which has two different WHERE functions according to the return of a variable. I tried some alternatives but none seem to fit, I need something with this logic:
IF (@show = 1)
WHERE d.statusId = ds.id;
ELSE
WHERE d.statusId != 3;
Is there another alternative or something that meets my need?
What the
SGBD
used?– Sorack