Anda dapat melakukannya menggunakan ATAU:
SELECT * FROM Person WHERE Status = @Status OR @Status IS NULL
Atau UNION ALL:
SELECT * FROM Person WHERE Status = @Status
UNION ALL
SELECT * FROM Person WHERE @Status IS NULL
Anda dapat melakukannya menggunakan ATAU:
SELECT * FROM Person WHERE Status = @Status OR @Status IS NULL
Atau UNION ALL:
SELECT * FROM Person WHERE Status = @Status
UNION ALL
SELECT * FROM Person WHERE @Status IS NULL