SELECT * FROM tabel1 ORDER BY CASE WHEN kolom = 'URUTANke1' THEN 1 WHEN kolom = 'URUTANke2' THEN 2 WHEN kolom = 'URUTANke3' THEN 3 WHEN kolom = 'URUTANke4' THEN 4 ELSE 5 END ASC
SELECT * FROM tabel1 ORDER BY FIND_IN_SET(namakolom,'URUTANke1,URUTANke2,URUTANke3,URUTANke4,URUTANke5,URUTANke6')
SELECT * FROM tabel1 ORDER BY CONCAT(namakolom)
Tidak ada komentar :
Posting Komentar