Writing a search function for ASP .NET with SQL and I want people to be able to search by keywords. Is there an SQL statement that I can write so that the product description field gets searched?
EG.
If the keyword is "light" I want the database to retrun every item in which one of the words in product description contains the word "light" E.G. Light bulb, light grey, flashlight etc.
Anyway I can do this? the description field will be multiple words, stored as chars.
Some pseudo code
Select * from Product where Description CONTAINS 'keyword'
Any sort of thing that will do contains?
EG.
If the keyword is "light" I want the database to retrun every item in which one of the words in product description contains the word "light" E.G. Light bulb, light grey, flashlight etc.
Anyway I can do this? the description field will be multiple words, stored as chars.
Some pseudo code
Select * from Product where Description CONTAINS 'keyword'
Any sort of thing that will do contains?