- Reading time: 1 min
- Published 4 years ago
Showing the existing tables in a database can be really handy. Unfortunately, MySQL's
SHOW TABLES; is not a standard sql command. Although it quite honestly should be. Thus, for quick reference, here goes:
SELECT name FROM pg_catalog.pg_tables;
SELECT name FROM sqlite_master WHERE type = 'table';
There probably is a
SELECT-Syntax for MySQL too, but who really cares? The one above is so much shorter in any case.