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

求纯mysql语句实现解决方案

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:48:21
Original
947 people have browsed it

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

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


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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template