简体   繁体   中英

How can i get single number exist in comma seprated string in mysql without find_in_set

Here is my column data:

Table Name: Employee

id  path
1   1,5,8,9,6,32,3

Now I need the Regexp query which will return true if specific number exist in Path column.

SELECT * FROM `Employee` WHERE `path` REGEXP '(^|,)(1|5|8|9|6|32|3)(,|$)'

尝试这个。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM