如何在 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'
相关文章