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

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -