On Tue, 27 Oct 2009, Ken wrote: > To: General Discussion of SQLite Database <sqlite-users@sqlite.org> > From: Ken <kennethinbox-sql...@yahoo.com> > Subject: Re: [sqlite] SQLite: question > > > Sql uses a single quote or a tick mark to delimit strings. > C, C++ and other languages use Dobule quote to delimit > strings. > > I think though that the column names may be double quoted > to differentiate them from data.
Right. See http://www.sqlite.org/lang_keywords.html for details. '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. *snip* SQLite adds new keywords from time to time when it takes on new features. So to prevent your code from being broken by future enhancements, you should normally quote any identifier that is an English language word, even if you do not have to. My 2cents - So if you only use "" double quotes for identifier names, and only '' single quotes for string constants, you should be OK for any future upgrades to SQLite. Kind Regards, Keith Roberts ----------------------------------------------------------------- Websites: http://www.php-debuggers.net http://www.karsites.net http://www.raised-from-the-dead.org.uk All email addresses are challenge-response protected with TMDA [http://tmda.net] ----------------------------------------------------------------- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users