The code for listing the tables in an SQLite database is as follows-
.tables ?PATTERN? List names of tables matching a LIKE pattern
Now, this code converts to the following SQL-
SELECT name FROM sqlite_master
WHERE type IN ('table','view') AND name NOT LIKE 'sqlite_%'
UNION ALL
SELECT name FROM sqlite_temp_master
WHERE type IN ('table','view')
ORDER BY 1
Or you may also use this code-
SELECT name FROM sqlite_master
WHERE type='table';