Order a word in sql

I have a table

id name status --------------------- 1 John Approved 2 Kelly Pending 3 Iva Pending 5 Denis Rejected 6 Michael Approved 

I want to group and organize in such a way as to display pending records first, approve the second and discard the last

+4
source share
1 answer
 SELECT * FROM tableName ORDER BY FIELD(`status`, 'Pending','Approved','Rejected') 

A SOURCE

+7
source

All Articles