SyntaxFix
Write A Post
Hire A Developer
Questions
One way to give preference to specific rows is to add a large number to their priority. You can do this with a CASE statement:
CASE
select id, name, priority from mytable order by priority + CASE WHEN name='core' THEN 1000 ELSE 0 END desc
Demo: http://www.sqlfiddle.com/#!2/753ee/1