Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Will return 0 or false:
- ```SQL
- SELECT "5,18,5,7,9,2" REGEXP "[[:<:]](8)[[:>:]]"
- ```
- Will return 1 or true:
- ```SQL
- SELECT "5,18,5,7,9,2" REGEXP "[[:<:]](5)[[:>:]]"
- ```
- **For Redshift you must use `~` instead REGEXP on above statements:**
- ```SQL
- SELECT "5,18,5,7,9,2" ~ "[[:<:]](5)[[:>:]]"
- ```
- MySQL have a a function called find_in_set():
- ```SQL
- SELECT FIND_IN_SET("c", "a,b,c,d,e");
- ```
Add Comment
Please, Sign In to add comment