vendredi 31 juillet 2015

SQL Search Column by Some Words

I am trying to write a program where I need SQL to select a column that doesn't exactly match the user input, just by a word or so. For example if I have a table that looks like this,

Type         Price
Fruit        $4.00  
Vegetables   $6.00

And if the user types in "Fruit Salad", how can I tell SQL to choose the column that contains the keywords "Fruit" or "Salad"?

Thanks!

Aucun commentaire:

Enregistrer un commentaire