SQLite Forum

INNER JOIN error
Login
> The SQL standard is to use double quotes for wrapping names that are keywords used as names or contain spaces.

The SQL standard allows double-quoted identifiers, whether or not they would otherwise be treated as something else.

> SQLite uses " and ' interchangeably (almost).

No, it does not. (The "almost" almost saves that assertion, but it misleads enough to make it a useless qualifier.)

What SQLite does, (and can be built to not do, fortunately), is allow SQL with incorrect quoting to be parsed "successfully" [a] in certain circumstances. There is little point in elaborating them; they amount to tolerating the wrongly quoted token when it saves the parse. It is much better, particularly for novices, to just use single-quote for string literals and double-quote for identifiers rather than trying to exploit that tolerance. Doing it right takes less brain power, develops better habits, and is less likely to produce surprise or disappointment.

[a. This would be for some but not all definitions of "success". ]