I have a SQLite database with a large number of tables. I would like to find out which have zero rows (and drop them). I have not got very far! What I can do is list the tables using this SQL:
SELECT tbl_name FROM sqlite_master WHERE type = 'table'
Is there a way in SQLite of turning that into a loop and printing the COUNT(*) for each of the tables?
(N.B. I have looked at Recursive Common Table Expressions (CTEs), but I cannot see how they might help.)