Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
V2EX
›
问与答
MYSQL: 能不能在所有表所有字段里查询字符串?
gdtv
·
Feb 21, 2016
· 2765 views
This topic created in 3726 days ago, the information mentioned may be changed or developed.
请问有没有办法用一两句 sql 语,在某数据库的所有表、所有字段里查询 like '%keyword%' 呢?
MySQL
所有
查询
SQL
2 replies
•
2016-02-21 17:44:04 +08:00
1
movtoy
Feb 21, 2016
能
2
lincanbin
Feb 21, 2016
读 information_schema 获取元数据,然后一次遍历所有元数据,根据模板构造出所有查询语句,执行。
这是我能最快想到的方案,具体有没有更快捷的做法,你可以去查询一下 MySQL 文档。
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
5432 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 53ms ·
UTC 05:50
·
PVG 13:50
·
LAX 22:50
·
JFK 01:50
♥ Do have faith in what you're doing.
❯