--1 WITH T(Name, plan_cd, input_id, cellphone, address) AS ( SELECT '111', '1', 'asd', '111', '11' FROM DUAL UNION ALL SELECT '222', '2', 'qwe', '123111', '11' FROM DUAL UNION ALL SELECT '333', '3', '123', '11', '11' FROM DUAL UNION ALL SELECT '444', '3', 'zxc', '11', '111' FROM DUAL ) SELECT * FROM T WHERE plan_cd IN(SELECT MAX(plan_cd) FROM T)
--2 윈도우 함수 이용 SELECT * FROM ( SELECT name, plan_cd, input_id, cellphone, address, RANK() OVER(ORDER BY plan_cd DESC) AS rk FROM T ) WHERE rk = 1