如何通过查询获取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?

我认为您追求的是

I think that what you're after is DESCRIBE

DESCRIBE table;

您还可以使用 SHOW TABLES

You can also use SHOW TABLES

SHOW TABLES;

获取数据库中表的列表.

to get a list of the tables in your database.