MySQL:如何在多个表中搜索任意列中存在的字符串
如何在 table_a table_b table_c
中搜索具有随机数量的字符串列?
我知道这不是正确的 sql,但它会类似于:
SELECT * FROM users, accounts, something_else WHERE ->ANY COLUMN CONTAINS 'this_string'<-
Ty in advance for SO Community
How can I search for in table_a table_b table_c
, which have a random number of columns for a string?
I know this is not proper sql but it would be something like:
SELECT * FROM users, accounts, something_else WHERE ->ANY COLUMN CONTAINS 'this_string'<-
Ty in advance for SO community
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将 全文索引 添加到所有字符串列在所有这些表中,然后合并结果
Add fulltext indexes to all of the string columns in all of those tables, then union the results