Andrew <berilthedw...@gmail.com> wrote: > I didn't see a way to search the mail archive, so hopefully this > hasn't been addressed repeatedly in the past... > > $ sqlite data.dat > SQLite version 2.8.17 > Enter ".help" for instructions > sqlite> .schema > sqlite> CREATE TABLE IF NOT EXISTS t ( foo int ); > SQL error: near "NOT": syntax error > sqlite>
IF NOT EXISTS clause was introduced in some fairly recent SQLite 3.x version. SQLite 2.8.17 doesn't support it. > I don't know why this statement isn't working, as it appears in the > documentation. SQLite 2.x is several years old. Documentation reflects the capabilities of the most recent version. > Is there a workaround? Just do a regular CREATE TABLE. If the table already exists, you'll get an error; ignore it. Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users