I have a varchar column with 3 rows:
i eat orange,
orange,
oranges are nice
I want SELECT query to return the result in this order:
orange, oranges are nice, i eat orange
i.e. those matches that start with the 'keyword'=orange should come before those that contain the keyword which again should come before those that ends with the keyword.
How can I do this using T-SQL? I tried using the LIKE keyword but no success so far.
But really, for this kind of search you want to use a full-text index.