FAQ

How do I check in SQLite whether a table exists?

If you’re using SQLite version 3.3+ you can easily create a table with:

1
create table if not exists TableName (col1 typ1, ..., colN typN)

In the same way, you can remove a table only if it exists by using:

1
drop table if exists TableName

Otherwise, you can use:

1
SELECT name FROM sqlite_master WHERE type='table' AND name='yourTableName';

if returning array count is equal to 1 its means table exist else not exist.

See javascript - Web SQL SELECT transaction return value - Stack Overflow