How to check if a Table exists in SQLite

To check if a Table exists in SQLite you can use the following snippet.

SELECT name FROM sqlite_master WHERE type='table' AND name='TableName'; -- temp tables can be selected by using ... FROM sqlite_temp_master ...

Please Share us:
Please rate this snippet

5 thoughts on “How to check if a Table exists in SQLite

Leave a Reply