Binary data in SQL, more trivia

Yesterday, I blogged about inlining boolean literals in SQL. This goes on with other data types. Let's look at BLOBs and BINARY data in general. This is also defined in SQL standards, not in SQL 1992, though: <binary string literal> ::=   X <quote> [ <space>... ]   [ { <hexit> [ <space>... ] <hexit> … Continue reading Binary data in SQL, more trivia

SQL and booleans, some trivia

Some trivia about SQL and booleans: SQL 1992 defines three values for a boolean: <truth value> ::= TRUE | FALSE | UNKNOWN True booleans aren't always supported, though. Here's the truth table of boolean support: SQL Dialect Supports booleans DB2 0 (use 1/0 instead) Derby true (you can safely use true/false) H2 true HSQLDB true … Continue reading SQL and booleans, some trivia