Search code examples
sql-serversqldatatypes

What is the difference between BIT and Boolean , Why we can use Boolean in SQL Server 2017


What is the Difference between Bit and Boolean?

Why can't we use boolean in SQL Server 2017.

I tried to use bool in SQL query it showing error.


Solution

  • There is no boolean in SQL Server. Instead it uses BIT type to store 0 or 1.

    You can refer this for more info