-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Walter Dnes wrote:
> Possibly a stupid question from a relative newbie; shouldn't that be...
> 
> sqlite3 :memory: 'create table test(fieldname integer)'

integer is not a reserved word so it is perfectly valid as a column name,
but I suspect the text was just intended to illustrate the problem anyway.

However you can use reserved words too if you quote them:

  create table foo([create], "table");

Both forms of quoting work.  A common mistake is to use double quotes around
strings - they quote SQL identifiers but sometimes work for strings.

And just to blow your mind, SQLite supports zero length names too!

  create table ""("");

Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkslxLkACgkQmOOfHg372QSuvQCfc7wZIPO554GIjKfP4xRqI1rv
TrUAnRtJAhQsIs2BNFEbuH6MiU68f216
=HnGy
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to