如何获取 MySQL 中所有表的所有列的名称? [英] How to get all columns' names for all the tables in MySQL?

查看:36
本文介绍了如何获取 MySQL 中所有表的所有列的名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种快速的方法可以从 MySQL 中的所有表中获取所有列名,而不必列出所有表?

Is there a fast way of getting all column names from all tables in MySQL, without having to list all the tables?

推荐答案

select * from information_schema.columns
where table_schema = 'your_db'
order by table_name,ordinal_position

这篇关于如何获取 MySQL 中所有表的所有列的名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆