如何在 MySQL 数据库中搜索特定列名? [英] How do I search a MySQL database for a specific column name?

查看:19
本文介绍了如何在 MySQL 数据库中搜索特定列名?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试查找我的数据库是否有名为 sort_method 的列.我已经环顾了论坛,但似乎无法找到正确的答案.我的数据库有 300 多个表,所以手动查找它不是一种选择.

I'm trying to find if my database has a column named sort_method. I have had a look around the forums, but I don't seem to be able to find the right answer. My database has over 300 tables, so manually looking for it is not an option.

我正在使用来自 phpMyAdmin 的 SQL 查询.

I'm using SQL queries from phpMyAdmin.

推荐答案

SELECT table_name,table_schema
FROM INFORMATION_SCHEMA.COLUMNS
WHERE column_name='sort_method'

这篇关于如何在 MySQL 数据库中搜索特定列名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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