Home >Backend Development >PHP Tutorial >求纯mysql语句实现解决方案

求纯mysql语句实现解决方案

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:48:21950browse

求纯mysql语句实现
当前有val字段 数据为 a|b|c

我想把数据虚拟为 |a|b|c| 在用like匹配条件 `val` like '%|a|%'  `val` like '%|c|%'想要结果是匹配出a| 和|c
------解决方案--------------------
for example


 SELECT 'Monty!' REGEXP '.*';
------解决方案--------------------
 concat('
------解决方案--------------------
',val,'
------解决方案--------------------
');

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn