Mysql method of querying table information: Execute the [select * from tables where table_schema = "db_name";] command to view the information of all tables in the database.
The specific method is as follows:
Related learning recommendations: mysql tutorial (video)
Query the information of all tables in a table:
use information_scheam; select * from tables where table_schema = "db_name";
Query the information of a single table:
use information_scheam; select * from tables where table_schema = "db_name" and table_name = "table_name1";
Query the information of all fields in a table:
use db_name; show full columns from table_name1; show full columns from table_name2;
This article From the php Chinese website mysql graphic tutorial channel, welcome to learn!
The above is the detailed content of How to query table information in mysql. For more information, please follow other related articles on the PHP Chinese website!