Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Truthiness and MySQL
SELECT
NULL, # \N
false, # 0
true, # 1
0 = false, # 1
1 = true, # 1
2 = true, # 0
true - false = 0, # 0
true + false = 1, # 1
true = null, # \N
false = null, # \N
true != null, # \N
false != null, # \N
true is null, # 0
false is null # 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment