sql - How to use Like '%' in a phrase with multiple words -


let's have following table

user|text 1   |red 123 orange blue green 2   |red orange blue 3   |blue orange 123 red 

if wanted pull users text includes both '123' , 'blue', how it? want pull user 1 , 3.

select * table text '%123%'&&'%blue%' or text '%blue%'&&'%123%' 

is better solved thru using regexp function?

try code:

select * table text '%123%' , text '%blue%' 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -