I wrote this sql query to search in a table:
SELECT * FROM TableName WHERE Name LIKE '%spa%'
The table contain these row for example:
- Space Company.
- Spa resort.
- Spa hotel.
- Spare Parts.
- WithoutTheKeyword.
I want to know how to edit this query so it return the results sorted like this:
2 Spa resort
3 Spa hotel
1 Space Company
4 Spare Parts
Means the items which contain the exact word first then the like ones.