You can use the PRAGMA query to test if a table exists or not.
"PRAGMA table_info(`tablename`)"
--
Alex Guion
Software Engineer
OrbNetworks, Inc.
www.orb.com
[EMAIL PROTECTED] wrote:
Thank you. My version does not. I had used one of the archives to search for
this issue, but the thread I found did not have an answer to the question.
--
Eric Pankoke
Founder / Lead Developer
Point Of Light Software
http://www.polsoftware.com/
-------------- Original message ----------------------
From: "Adriano Ferreira" <[EMAIL PROTECTED]>
On 10/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
If I use the syntax "DROP TABLE tablename" everything is good, except of
course I get a "no such table" error if the table does not exist. However, if I
use the syntax "DROP TABLE IF EXISTS tablename", then I get the following error:
'near "EXISTS": syntax error'. Anyone have a thought as to what's going on? Is
this a known issue?
It looks like the same issue on the thread "Trouble with ALTER
TABLE/ADD", answered by drh. Are you sure your version of SQLite
supports "DROP TABLE IF EXISTS"?
The URL http://www.sqlite.org/cvstrac/wiki?p=UnsupportedSql says
IF EXISTS function, e.g. "DROP TABLE IF EXISTS temp;"
Added in 3.3
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------