[Tutor] Python sqlite3 issue

Peter Otten __peter__ at web.de
Tue Oct 21 10:18:23 CEST 2014


Alan Gauld wrote:

> Finally when creating tables you can use:
> 
> DROP TABLE IF EXISTS TOPICS;
> 
> Prior to creating it. That will ensure you don't get an existing
> table error.

Another option is to only create the table if it does not already exist:

create table if not exists topics ...




More information about the Tutor mailing list