๐ซ ๋ฌธ์
๐ซ CODE
SELECT PRODUCT_ID, PRODUCT_NAME, PRODUCT_CD, CATEGORY, PRICE
FROM FOOD_PRODUCT
WHERE PRICE = (SELECT MAX(PRICE) FROM FOOD_PRODUCT);
ย
๐ซ ํ์ด ์กฐ๊ฑด
1. ๊ฐ๊ฒฉ์ด ์ ์ผ ๋น์ผ ์ํ
2. ์ํ ID, ์ํ ์ด๋ฆ, ์ํ ์ฝ๋, ์ํ๋ถ๋ฅ, ์ํ ๊ฐ๊ฒฉ ์กฐํ
ย
๐ซ ํ์ด
1. SELECT PRODUCT_ID, PRODUCT_NAME, PRODUCT_CD, CATEGORY, PRICE
- ์ํ ID(PRODUCT_ID), ์ํ ์ด๋ฆ(PRODUCT_NAME), ์ํ ์ฝ๋(PRODUCT_CD), ์ํ๋ถ๋ฅ(CATEGORY), ์ํ ๊ฐ๊ฒฉ(PRICE) ์กฐํ
2. WHERE PRICE = (SELECT MAX(PRICE) FROM FOOD_PRODUCT)
- MAX()ํจ์๋ฅผ ์ฌ์ฉํ์ฌ ์ํ ๊ฐ๊ฒฉ(PRICE)์ ์ต๋๊ฐ ๊ตฌํ๊ธฐ