搜寻所有栏位的MYSQL查询? [英] MYSQL query for searching through ALL the fields?
本文介绍了搜寻所有栏位的MYSQL查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
听起来很愚蠢,有没有办法做这样的事情:
As dumb as it sounds, is there a way to do something like this:
select row_id from mytable where * like '%searched_text%';
在这里*是指表格中的所有字段",而不是我一一指定它们...
By * here I mean "all the fields" in the table, instead of me specifying them one by one...
推荐答案
一个查询是不可能的.
但是什么时候做:
DESCRIBE table_name;
您将获得可用于生成查询的字段名称.
you get the field names which you can generate the query from.
在每个表中搜索所有字段MySQL数据库可能有用.
这篇关于搜寻所有栏位的MYSQL查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文