|
How to write where clause for a Bit column?
I have a table which has the following columns with data types:
tblProducts:
ProductID int
ProductName nvarchar
IsValue bit (its either 0 or 1)
Rank nvarchar
So when I write a select statement how should I set the value for IsValue - meaning with single quotes or without any quotes as follows:
SELECT ProductID, ProductName, IsValue
FROM tblProducts
WHERE IsValue = 0 ORDER BY Rank
Is the above one correct or I should put the 0 within quotes or any other way?
|