2
What query makes me query a certain database in mysql that brings me all its tables?
2
What query makes me query a certain database in mysql that brings me all its tables?
3
You can use the show tables
for this purpose, see an example:
show tables from
minhaBaseDeDados;
He accepts the clause from
, and with it you can specify your database.
Source:http://imasters.com.br/artigo/3001/mysql/comando-show/
helped and a lot, I did not use the from, as I was at the base used only "show Tables"
2
mysql> USE test;
Database changed
mysql> SHOW TABLES;
+----------------+
| Tables_in_test |
+----------------+
| t1 |
| t2 |
| t3 |
+----------------+
3 rows in set (0.00 sec)
I believe that’s what you’re asking, it’s a little wide.
is the simplest command of the solutions presented!
1
You can do this in Mysql, through information_schema that stores database metadata.
SELECT * FROM information_schema.tables WHERE table_schema = 'database'
the other commands are simpler, but this solution brings more details
@Dichrist yes you can other information there depends on your need.
Browser other questions tagged mysql sql query
You are not signed in. Login or sign up in order to post.
Yes it is possible!
– rray
show Tables ...
– Clayderson Ferreira
but how? a friend of mine said he had to inform the schema... but I could not find
– DiChrist
damn... show Tables worked... rs
– DiChrist
I don’t understand the downvote ...
– rray
neither I, never mind
– DiChrist