sqlite - how to check if table exists before completing inserts?

sqlite

Solution

To check that your table exists or not, you can use:

SELECT * FROM sqlite_master WHERE name ='myTable' and type='table'; 

Problem

What is the best SQL for a SQLite database to effectively do: ``` If Database Table Exists then - create table - insert row - insert row (i.e. for startup data) end ```

Original source

Related problems