SELECT ID, NIP, TGL_AWAL_CUTI_PEG, TGL_AKHIR_CUTI_PEG, RENTANG_TANGGAL, TGL_SRT_IZIN_CUTI, NO_SRT_IZIN_CUTI, TANGGAL_BUAT, TANGGAL_UBAH, JUMLAH_CUTI, NAMA_BUAT, ATURAN_WAKTU, KSO_KASUSNOMOR, CBE_ID
FROM SPG_CUTI_PEGAWAI WHERE NIP='02371' 
ORDER BY TGL_AWAL_CUTI_PEG ASC;

SELECT ROW_NUMBER() OVER (
            ORDER BY 
                ID, 
                NIP 
        ) row_num, * FROM SPG_CUTI_PEGAWAI WHERE ID = 362166

SELECT
	*
FROM
	(
		SELECT ROW_NUMBER() OVER ( ORDER BY ID, NIP ) row_num, * FROM SPG_CUTI_PEGAWAI WHERE ID = 362166
	) AS x
WHERE
	row_num = 2

select * from SPG_CUTI_PEGAWAI WHERE ID = 362166
select * from SPG_CUTI_PEGAWAI WHERE ID = 999999

UPDATE
	x
SET
	ID = 999999
FROM
	(
		SELECT ROW_NUMBER() OVER ( ORDER BY ID, NIP ) row_num, * FROM SPG_CUTI_PEGAWAI WHERE ID = 362166
	) AS x
WHERE
	row_num = 2

DELETE from SPG_CUTI_PEGAWAI WHERE ID = 999999