Right now I have this statement

DELETE FROM sqlite_sequence where name = 'table_name';

which works fine in most cases, but now I have a case where the sqlite_sequence table is not being created and so I get back

no such table: sqlite_sequence

I need a statement that only does the delete if the table exists. I've found this statement to tell me if the table exists or not

SELECT name FROM sqlite_master WHERE type='table';

But so far I've been unable to successfully pair it with the delete satement

Edit
Report