Lister les tables d’une base de donnée
- MySQL / MariaDB
$ mysql -u root -p
mysql> use <database_name>;
mysql> show tables;
- PostgreSQL
$ sudo su postgres
$ psql
\list (1)
\connect <pg_database> (2)
\dtvs (3)
SELECT table_name FROM pg_database; (3)
1 | list all databases |
2 | connect to a database |
3 | equivalent, list tables in a database |
- SQLite3
$ sqlite3 <file>.sqlite
SELECT * FROM sqlite_master WHERE type='table';