3 ms·
> 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 tha
by marcosdumay 2y ago
> 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.
- nolist_policy 2y agoC programmer joins the chat.
- mort96 2y agoHey we've had _Bool and <stdbool.h> since 1999!
- dvfjsdhgfv 2y agoWell, everything is a boolean in ANSI C. If I use `if (a)` I know the code will be executed only if `a` is nonzero.
- bdcravens 2y agoPedantic, but the type is bit in MSSQL.
- breakingcups 2y agoI 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-transact-sql?view=sql-server-ver16 https://learn.microsoft.com/en-us/sql/t-sql/data-types/bit-t...