1
How do I get phpmyadmin to show me this:
--- tabelas ---
usuarios(5)
clientes(20)
admins(2)
for example using some mysql command or even some phpmyadmin functionality?
1
How do I get phpmyadmin to show me this:
--- tabelas ---
usuarios(5)
clientes(20)
admins(2)
for example using some mysql command or even some phpmyadmin functionality?
2
In Phpmyadmin you just select the database and click on (+) and it will expand and display all tables of the selected database, re-apply on (+) next to the table will display its fields. See:
If you wanted to do it via Mysql, use the SHOW TABLES command, as the friend NULL has already replied:
SHOW TABLES FROM database;
@Edit
You also want to count records from each table, is that right? If it is, use the command below:
SELECT TABLE_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'seu_database'
1
To view the tables of a given Database in Mysql with the number of columns use SQL below:
Obs: 'Generics' is the name of the Bank, then switch to the name of your bank
SELECT a.TABLE_NAME,
a.TABLE_SCHEMA,
(SELECT count(*) FROM information_schema.COLUMNS b
WHERE b.TABLE_SCHEMA = a.TABLE_SCHEMA and b.TABLE_NAME = a.TABLE_NAME)
TABLE_COLUMNS_COUNT
FROM INFORMATION_SCHEMA.TABLES a
WHERE a.TABLE_TYPE = 'BASE TABLE' and a.TABLE_SCHEMA = 'generics'
Another would be with Group By (Note: will bring the views also)
SELECT b.TABLE_NAME,
b.TABLE_SCHEMA,
count(b.TABLE_SCHEMA) TABLE_COLUMNS_COUNT
FROM information_schema.COLUMNS b
WHERE b.TABLE_SCHEMA = 'generics'
GROUP BY b.TABLE_SCHEMA, b.TABLE_NAME
Source: Click here
Good answer, that’s right Thank you..
Vlw @Silvioandorinha
Browser other questions tagged mysql phpmyadmin
You are not signed in. Login or sign up in order to post.
Good answer but he brought me the amount of record in each table and I want to know the amount of column.. but still it was worth it
– Silvio Andorinha