I am trying to fetch a list of results that has ALMOST similar value to the one I provides.
id | food
1) 1 onions, pepper, ketchup
2) 2 burger, spinach, tomato
3) 3 chicken, barbecue, ham
4) 4 onions, pepper, chicken
5) 5 book, pencil, paper
My goal is to return any row that has ALMOST identical to "chicken, pepper, onions
"
I have tried the LIKE function, but it will only return rows only when the value that you provide is in correct order and can be found somewhere on the columns.
My code is like this:
SELECT * FROM table WHERE food LIKE ="%chicken, pepper, onions%"