I have a table consists of the following fields
with the following values
1, ciro 2, test ciro 3, ciprox 4, other 5, other
i would like to get all the values that begin with "ci" or contain "ci" but show me the results before they start with ci and then the rest.
select * FROM table WHERE name like 'ci%' or name like '%ci%' order by name;
1, ciro 2, test ciro 3, ciprox
1, ciro 3, ciprox 2, test ciro
therefore before the rows in which name begins with "ci" and then those that contain
is there a way without using two queries to obtains the result?