Hi Jonathan, Derrel, thanks for the info. I just wanted to know as I am creating an application that interacts with the SQLite.dll and if a user was to try to create a table beginning with "sqlite_" the user would get the very detailed erro message, but if for some reason the user wanted to call the table "Table" they would just get a simple SQL syntax error and may become stuck in my application.
I'll just put some check on the input from the user and if on the off chance they decide to call it table, it will change it to "Table". Is there any other names I need to look out for other than the "sqlite_" and "table" that SQLite doesn't like as being a table name that anyone knows of? Thanks again John On 26/07/06, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote:
"John Newby" <[EMAIL PROTECTED]> writes: > Does anyone know any reason why SQLite doesnt like tables called "Table" or > is this a standard SQL thing? It's a reserved word, so if you really, Really, REALLY want to create a table of that name (you're making it confusing to read, so you really shouldn't), you can do it using either quotes or square brackets around the table name, as shown here: SQLite version 3.2.1 Enter ".help" for instructions sqlite> create table "TABLE" (i integer); sqlite> .schema CREATE TABLE "TABLE" (i integer); sqlite> .mode line sqlite> select * from sqlite_master; type = table name = TABLE tbl_name = TABLE rootpage = 2 sql = CREATE TABLE "TABLE" (i integer) sqlite> drop table "table"; sqlite> create table [TABLE] (i integer); sqlite> .schema CREATE TABLE [TABLE] (i integer); sqlite> select * from sqlite_master; type = table name = TABLE tbl_name = TABLE rootpage = 2 sql = CREATE TABLE [TABLE] (i integer) sqlite> Derrell