Je kunt het doen met OF:
SELECT * FROM Person WHERE Status = @Status OR @Status IS NULL
Of UNION ALL:
SELECT * FROM Person WHERE Status = @Status
UNION ALL
SELECT * FROM Person WHERE @Status IS NULL
Je kunt het doen met OF:
SELECT * FROM Person WHERE Status = @Status OR @Status IS NULL
Of UNION ALL:
SELECT * FROM Person WHERE Status = @Status
UNION ALL
SELECT * FROM Person WHERE @Status IS NULL