如何通过查询获取MySQL中的数据库结构 [英] How to get database structure in MySQL via query
本文介绍了如何通过查询获取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.
这篇关于如何通过查询获取MySQL中的数据库结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文