In alternativa al ISNULL
/ COALESCE
opzioni, puoi verificare che i parametri siano nulli:
SELECT NAME
FROM TABLE
WHERE
(@City IS NULL OR City = @City)
AND
(@Gender IS NULL OR Gender = @Gender)
AND
(@Age IS NULL OR Age = @Age)
In alternativa al ISNULL
/ COALESCE
opzioni, puoi verificare che i parametri siano nulli:
SELECT NAME
FROM TABLE
WHERE
(@City IS NULL OR City = @City)
AND
(@Gender IS NULL OR Gender = @Gender)
AND
(@Age IS NULL OR Age = @Age)