Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张桌子
id name status --------------------- 1 John Approved 2 Kelly Pending 3 Iva Pending 5 Denis Rejected 6 Michael Approved
我想以这样一种方式进行分组和排序,它首先显示待处理记录,第二个批准并最后拒绝
SELECT * FROM tableName ORDER BY FIELD(`status`, 'Pending','Approved','Rejected')
资源