Created
December 5, 2011 20:32
-
-
Save springmeyer/1435230 to your computer and use it in GitHub Desktop.
sqlite madness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
column foo does not exist so query should throw an error | |
*/ | |
-- proper error if field is not quoted | |
sqlite> select foo from empty; | |
Error: no such column: foo | |
-- proper error if field is escaped using brackets | |
sqlite> select [foo] from empty; | |
Error: no such column: foo | |
-- proper error if field is escaped using fancy quotes | |
sqlite> select `foo` from empty; | |
Error: no such column: foo | |
-- no error if double or single quotes are used | |
sqlite> select "foo" from empty; | |
sqlite> select 'foo' from empty; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment