Storing Boolean Values In SQL? Storing Boolean Values In SQL? sql sql

Storing Boolean Values In SQL?


Use the bit data type instead for your column. Then you can insert true/false directly.


Use bit

This accepts the strings "true" and "false".

It also maps directly to the c# boolean type which is useful


Since there there is no Boolean in SQL server you can just use bit and set it to 0/1