declare @t table(row int, isalive bit) insert @t values ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

declare @t table(row int, isalive bit)

insert @t values (1,1)
insert @t values (2,0)
insert @t values (3,null)

declare @isalive tinyint
set @isalive = 4

SELECT * FROM @t
where coalesce((1-coalesce(isalive, 0)) ^  @isalive , 1) > 0

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results