RSmith wrote:
> On 2014/03/27 02:50, Scott Robison wrote:
>> Double quotes are part of the SQL-92 standard. I'm pretty sure they are,
>> anyway. They are used (along with other database specific means) to delimit
>> identifiers that would otherwise be illegal.
>
> Double quotes are not part of the standard, just allowed by most systems in
> lieu of single quotes

No.  To quote <http://www.sqlite.org/lang_keywords.html>:
| There are four ways of quoting keywords in SQLite:
|
| 'keyword'  A keyword in single quotes is a string literal.
| "keyword"  A keyword in double-quotes is an identifier.
| [keyword]  A keyword enclosed in square brackets is an identifier.
|            This is not standard SQL. This quoting mechanism is used by
|            MS Access and SQL Server and is included in SQLite for
|            compatibility.
| `keyword`  A keyword enclosed in grave accents (ASCII code 96) is an
|            identifier. This is not standard SQL. This quoting
|            mechanism is used by MySQL and is included in SQLite for
|            compatibility.
|
| For resilience when confronted with historical SQL statements, SQLite
| will sometimes bend the quoting rules above:
|
| * If a keyword in single quotes (ex: 'key' or 'glob') is used in
|   a context where an identifier is allowed but where a string literal
|   is not allowed, then the token is understood to be an identifier
|   instead of a string literal.
|
| * If a keyword in double quotes (ex: "key" or "glob") is used in
|   a context where it cannot be resolved to an identifier but where
|   a string literal is allowed, then the token is understood to be
|   a string literal instead of an identifier.
|
| Programmers are cautioned not to use the two exceptions described in
| the previous bullets. We emphasize that they exist only so that old
| and ill-formed SQL statements will run correctly. Future versions of
| SQLite might raise errors instead of accepting the malformed
| statements covered by the exceptions above.


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to