On Apr 28, 2009, at 11:38 AM, Igor Tandetnik wrote:
> Jean-Denis Muys <[email protected]> wrote:
>> My create table statement (program-generated from a text file) below
>> yields a syntax error.
>
> Column names should be valid identifiers (a sequence of digits,
> letters
> and underscores that doesn't begin with a digit), or else enclosed in
> double quotes, as in
>
> create table document ("TC1.DOCUMENT.SORT" TEXT, ...)
>
> The same is true for table names, index names and so on.
You should use double-quotes (as Igor recommends) because that is the
SQL standard. However, please also note that for compatibility with
MySQL and with MS-SQL Server, SQLite also supports quoting identifiers
using grave accents and square brackets. All of the following work
the same:
"tc1.doc.sort"
`tc1.doc.sort`
[tc1.doc.sort]
Let me reemphasize that the first example (double-quotes) is preferred.
D. Richard Hipp
[email protected]
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users