如何通过查询获取MySQL中的数据库结构

问题描述:

是否有可能以某种方式获取 MySQL 数据库的结构,或者只是一些带有简单查询的表?

Is it possible to somehow get structure of MySQL database, or just some table with simple query?

或者有其他方法,我该怎么做?

Or is there another way, how can I do it?

我认为你所追求的是 DESCRIBE

I think that what you're after is DESCRIBE

DESCRIBE table;

你也可以使用SHOW TABLES

SHOW TABLES;

获取数据库中表的列表.

to get a list of the tables in your database.