What is the query that makes me query a certain database in mysql that brings me all its tables?
What is the query that makes me query a certain database in mysql that brings me all its tables?
mysql> USE test;
Database changed
mysql> SHOW TABLES;
+----------------+
| Tables_in_test |
+----------------+
| t1 |
| t2 |
| t3 |
+----------------+
3 rows in set (0.00 sec)
I think that's what you're asking for, it's a little broad.
You can use show tables
for this purpose, see an example:
show tables from
minhaBaseDeDados;
It accepts the from
clause, and with it you can specify your database.
Source: link
You can do this in MySQL, using the information_schema that keeps the meta database data.
SELECT * FROM information_schema.tables WHERE table_schema = 'database'