Home > Database > Mysql Tutorial > body text

How to view table names and comments in mysql

王林
Release: 2020-10-19 10:55:39
Original
5331 people have browsed it

Mysql method to view table names and comments: execute the [select table_name from information_schema.tables where table_schema='database name';] statement to view.

How to view table names and comments in mysql

Query all table names

(Recommended tutorial: mysql video tutorial)

select table_name from information_schema.tables where table_schema='数据库名称';
Copy after login

Query Comments on database table names:

select table_name 表名,TABLE_COMMENT 表注释 from INFORMATION_SCHEMA.TABLES Where table_schema = '数据库名称' AND table_name ="表名"
Copy after login

Related recommendations: mysql tutorial

The above is the detailed content of How to view table names and comments 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!