SQL Server - boolean literal?

前端 未结 13 865
深忆病人
深忆病人 2020-12-04 22:56

How to write literal boolean value in SQL Server? See sample use:

select * from SomeTable where PSEUDO_TRUE

another sample:



        
13条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 23:44

    How to write literal boolean value in SQL Server?
    select * from SomeTable where PSEUDO_TRUE

    There is no such thing.

    You have to compare the value with something using = < > like .... The closest you get a boolean value in SQL Server is the bit. And that is an integer that can have the values null, 0 and 1.

提交回复
热议问题