mysql - SQL query - match any part of string -
mysql - SQL query - match any part of string -
i have table contains varchar column called - doc_name. query column string matches, partial matches accepted well.
for example, column contains:
"how unsafe virus , spyware attach on scheme – techicode"
if search "virus spyware" no results. don't want search each word separately, might homecoming irrelevant results. also, want search 'keywords' , not necessary whole string.
i've tried next options:
select * docs doc_name '%virus spyware%';
i've tried:
select * docs doc_name concat('%','virus spyware','%') but i've mentioned, don't results back.
i there query can utilize homecoming value?
thanks in advance.
select * docs doc_name '%virus%spyware%'
or if order doesn't matter , 1 needs match:
select * docs doc_name '%virus%' or doc_name '%spyware%' if keywords must match utilize and instead of or.
mysql sql-server
Comments
Post a Comment