Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Another WTF moment was realisation that MS SQL Server does not support BOOLEAN type.

The standard does not have a boolean type. It's a postgres extension that the other open source databases adopted (because, yeah, it's obvious). But the proprietary ones insist on not having.

The official recommendation is using byte on MS SQL and char(1) on Oracle. Both are ridiculous.



Pedantic, but the type is bit in MSSQL.


I don't think that's true. Even 2005 had a bit type and it's better optimized for space: https://learn.microsoft.com/en-us/sql/t-sql/data-types/bit-t...


C programmer joins the chat.


Hey we've had _Bool and <stdbool.h> since 1999!


Well, everything is a boolean in ANSI C. If I use `if (a)` I know the code will be executed only if `a` is nonzero.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: