conn = sqlite3.connect(':memory:') c = conn.cursor() try: c.execute('ALTER TABLE mytable ADD COLUMN newcolumn;') except: pass # handle the error c.close()