On Friday, 25 October, 2019 20:45, Simon Slavin <slav...@bigfraud.org> wrote:

>On 25 Oct 2019, at 10:55pm, Thomas Kurz <sqlite.2...@t-net.ruhr> wrote:

>> SELECT column2 AS "d"

>If you want to do it, do it like that.  Double quotes indicate an entity
>name.  Single quotes indicate a string of characters.

>However, almost nobody quotes entity names these days.  The language is
>written so that you don't need to.  Anything unquoted is understood to be
>an entity name until proven otherwise.

If the identifier is also a keyword and used in a location where it could be 
that keyword (or any location even where the interpretation as a keyword rather 
than an identifier would be absurd and you are using a particularly stupid 
parser); it starts with an ill-conceived character for an identifier; or, it 
contains an embedded ill-conceived character, then you need to quote the 
identifier.  Ill-conceived starting characters include most non-alphabetic 
characters except and underscore, and ill-conceived embedded characters include 
symbols that have other, usually terminal, meanings (space +-*/. etc).

Other than those cases you need not quote identifiers.  Identifiers are case 
preserving but case insensitive.

-- 
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to