문제
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