Sql query to retrieve topmost matching string name in database
Eg: if v give any sentence as test "the beautiful nature" then resultant answer should place topmost result from database
resultatn content can be like
1) the beautiful nature(Most matching at top)
2) beautiful
3) beautiful nature.
Query
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Nov 11, 2010, 12:04 AM EST
Use like operator in your Query.
example Is:
Select stuff from StuffPlace where stuff like 'the beautiful nature'
Select stuff from StuffPlace where stuff like '%beautiful%'// This will retrieve all the values which is having the name beautiful in stuff column.
And other solution is use OR operator in your Query.
If this post helped you, then tick the "Do you like this Answer" check box which is placed at above this post.
Sreekanth199 reputationPosted Nov 11, 2010, 12:31 AM EST
select * from Table_Name where column_Name like 'the beautiful nature%' ;
:)
Suresh PaldiaRank #1,206 · 1.5K reputationPosted Nov 11, 2010, 3:16 AM EST