Home > Database > Mysql Tutorial > How to query table information in mysql

How to query table information in mysql

王林
Release: 2020-09-03 10:36:19
Original
24826 people have browsed it

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.

How to query table information in mysql

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";
Copy after login

Query the information of a single table:

use information_scheam;
select * from tables where table_schema = "db_name" and table_name = "table_name1";
Copy after login

Query the information of all fields in a table:

use db_name;
show full columns from table_name1;
show full columns from table_name2;
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template