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.
Loading
Suresh PaldiaPosted Nov 11, 2010, 8:16 AM
SreekanthPosted Nov 11, 2010, 5:31 AM
select * from Table_Name where column_Name like 'the beautiful nature%' ;
:)
Jiteendra SampathiraoPosted Nov 11, 2010, 5:04 AM
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.