所以,我有这个:
select ticket_trackingno, ticket_title, ticket_priority_id, ticket_status_id from hd_tickets where ticket_priority_id <> 'None' and ticket_status_id = 'Assigned' order by ticket_priority_id desc
这样,我的ticket_priority_id列就被排序为med,low,high。我想要的是低,中,高。我想知道如何去做?
ORDER BY CASE ticket_priority_id WHEN 'low' THEN 1 WHEN 'med' THEN 2 WHEN 'high' THEN 3 END