Alternativt til ISNULL
/ COALESCE
muligheder, kan du teste parametrene for at være null:
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)
Alternativt til ISNULL
/ COALESCE
muligheder, kan du teste parametrene for at være null:
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)