On Tue, Aug 25, 2009 at 11:19:17AM -0400, Angus March scratched on the wall:
> It also says on http://www.sqlite.org/lang_keywords.html that in
> case you use a name that one day becomes a keyword you should always use
> quotes.
It is also quite specific about which quotes to use: single-quotes
for string literals, double quotes for identifiers. An identifier
is a table/view, index, database, or column name.
In your original statement you mix them at will, using both single
and double for identifiers:
UPDATE 'KEYS' SET 'IVAndKey'=:VVV WHERE "ItemID"=?NNN
All of these are identifiers, and all of them should use double quotes:
UPDATE "KEYS" SET "IVAndKey"=? WHERE "ItemID"=?
As the page you reference explains, the use of single quotes works
for identifiers, in some cases, but can actually make the situation
worse and "Programmers are cautioned not to use the two exceptions...."
There have been serious discussions in the recent past about making
SQLite's quote usage more strict. Quoting is a good idea, but
incorrect quoting is worse than no quoting at all.
-j
--
Jay A. Kreibich < J A Y @ K R E I B I.C H >
"Our opponent is an alien starship packed with atomic bombs. We have
a protractor." "I'll go home and see if I can scrounge up a ruler
and a piece of string." --from Anathem by Neal Stephenson
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users