〜 TABLE IF EXISTS 〜 は使えるバージョンと使えないバージョンがあるっぽい。
使えないバージョン
3.2.1-1 (sargeとか)
$ sqlite3 hoge.db SQLite version 3.2.1 Enter ".help" for instructions sqlite> DROP TABLE IF EXISTS hoge; SQL error: near "EXISTS": syntax error sqlite>
使えるバージョン
3.5.9-6 (lennyとか) 、3.3.8-1.1 (etchとか)
$ sqlite3 hoge.db SQLite version 3.5.9 Enter ".help" for instructions sqlite> DROP TABLE IF EXISTS hoge; sqlite>