mysql中如何查询带%的字符
答案:2 悬赏:50
解决时间 2021-04-27 11:26
- 提问者网友:逐野
- 2021-04-27 04:38
mysql中如何查询带%的字符
最佳答案
- 二级知识专家网友:懂得ㄋ、沉默
- 2021-04-27 04:44
可以直接精确查询:
select * from test where name ='%a' -------------查询name为 %a的数据
模糊查询 select * from test where name like '%\%a%'; -----------模糊查询name中包含 %a的数据
select * from test where name ='%a' -------------查询name为 %a的数据
模糊查询 select * from test where name like '%\%a%'; -----------模糊查询name中包含 %a的数据
全部回答
- 1楼网友:兮沫♡晨曦
- 2021-04-27 04:54
比如查是否有pangyiguang
mysql有个函数:find_in_set
select find_in_set('pangyiguang','94pangyiguang88');或者你用
select * from tb where filed like '%pangyiguang%';
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息!
大家都在看
推荐信息