How to view tables in SQL: PostgreSQL, MySQL and SQLite
Do you need a list of tables, their columns or the rows inside one table? Each takes a different query. Pick the section for your database below; SHOW TABLES isn’t shared by every SQL engine.
List tables in PostgreSQL
SELECT table_name
FROM information_schema.tables
WHERE table_schema = 'public'
AND table_type = 'BASE TABLE'
ORDER BY table_name;Replace public with your application schema. Run it in the database that contains your tables. The information_schema.tables reference explains visibility and object types.
List tables in MySQL or MariaDB
SHOW FULL TABLES FROM shop;Replace shop with an accessible database. The output distinguishes tables from views. Follow the MySQL inspection walkthrough to inspect columns and select records.
List tables in SQLite
SELECT name
FROM sqlite_schema
WHERE type = 'table'
AND name NOT LIKE 'sqlite_%'
ORDER BY name;SQLite’s schema belongs to a database file. Opening a different file is not equivalent to changing a server-side schema. See SQLite tables and columns for the next steps.
Read records after checking columns
For an illustrative tasks table with id and title columns:
SELECT id, title
FROM tasks
ORDER BY id
LIMIT 25;This bounded query works with the named engines when that table exists in the current resolution context. Use a schema-qualified name where appropriate. SQL Server has different result-limit syntax and is not currently supported by plainDB; do not copy this example into every engine unchanged.
Interpret the result correctly
- An unknown-table error suggests a naming, database or schema mismatch.
- A permission error is not an empty table.
- A successful query returning no rows may reflect filters, permissions or genuinely empty data.
- A GUI showing 25 rows may be showing a page rather than the table’s total size.
Record the exact query and connection identity when asking for help. Avoid a broad SELECT * on sensitive tables merely to prove a connection works.
plainDB can browse these supported engines and run their SQL. Use the viewer evaluation checklist when choosing a workspace.