SyntaxFix
Write A Post
Hire A Developer
Questions
The same way you declare any other variable, just use the bit type:
bit
DECLARE @MyVar bit Set @MyVar = 1 /* True */ Set @MyVar = 0 /* False */ SELECT * FROM [MyTable] WHERE MyBitColumn = @MyVar