Randall wrote:

Hi,
I acnnot get "IF EXISTS" to work for "DROP TABLE IF EXISTS tablename";
ver 3.2.8;
I see "IF NOT EXISTS" started in ver 3.3.0, but "IF EXISTS" has been in the syntax page for at least months; am I doing something wrong?
Randall


Randal,

It works fine for me in version 3.3.2. See the sqlite shell session below.

SQLite version 3.3.2
Enter ".help" for instructions
sqlite> drop table t;
SQL error: no such table: t
sqlite> drop table if exists t;
sqlite> create table t(a,b);
sqlite> select name from sqlite_master;
t
sqlite> drop table if exists t;
sqlite> select name from sqlite_master;
sqlite>

This feature was first implemented in version 3.3.0, so you will need to upgrade from version 3.2.8.

HTH
Dennis Cote

Reply via email to