How do I search a MySQL database for a specific column name?(如何在 MySQL 数据库中搜索特定列名?)
本文介绍了如何在 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 数据库中搜索特定列名?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
织梦狗教程
本文标题为:如何在 MySQL 数据库中搜索特定列名?
基础教程推荐
猜你喜欢
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 在多列上分布任意行 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- oracle区分大小写的原因? 2021-01-01
