Are there reasons for not storing boolean values in SQL as bit data types?

I’d always stick with the smallest data type I can to store this.

  • SQLServer: BIT
  • Oracle: NUMBER(1) (or BOOLEAN in PL/SQL)
  • MySQL: TINYINT (iirc BOOLEAN maps to this automatically)

Edit: Oracle’s BOOLEAN is PL/SQL only, not table definition. Updated answer to reflect this.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)