[SQL문제풀기] 가격이 제일 비싼 식품의 정보 출력하기

silver's avatar
May 26, 2025
[SQL문제풀기] 가격이 제일 비싼 식품의 정보 출력하기

문제

MYSQL

내가 작성한 정답

#1 select * from food_product order by price desc limit 1; #2 select * from food_product where price = (select max(price) from food_product);

ORACLE

내가 작성한 정답

--1 select * from (select * from food_product order by price desc) where rownum <=1; --2 select * from food_product order by price desc fetch first 1 rows only; --3 select * from food_product where price = (select max(price) from food_product);
Share article

silver