where 절에 식당 가격 비교 코드 , 이름 기준 검색 코드
-- 메뉴, 1,2,3,4
SELECT A.REST_NAME restName -- 식당이름
,A.REST_FAV_CNT restFavCnt -- 식당평점
,A.REST_ADD1 restAdd1 -- 식당주소1
,A.REST_ADD2 restAdd2 -- 식당주소2
,A.REST_REVIEW_CNT restReviewCnt -- 리뷰점수
,A.REST_DISTANCE restDistance -- 거리
,A.REST_TYPE restType -- 분류
,A.REST_CODE redtCode
,B.MENU_NAME menuName --메뉴이름
,B.MENU_PRICE menuPrice --메뉴 가격
FROM TB_REST_INFO A INNER JOIN TB_MENU B ON(A.REST_CODE = B.REST_CODE)
WHERE A.REST_DISTANCE = 1 AND A.REST_TYPE='한식' AND
(
(7000 >= B.MENU_PRICE AND B.MENU_PRICE >= 5000)
);
SELECT A.REST_NAME restName -- 식당이름
,A.REST_FAV_CNT restFavCnt -- 식당평점
,A.REST_ADD1 restAdd1 -- 식당주소1
,A.REST_ADD2 restAdd2 -- 식당주소2
,A.REST_REVIEW_CNT restReviewCnt -- 리뷰점수
,A.REST_DISTANCE restDistance -- 거리
,A.REST_TYPE restType -- 분류
,A.REST_CODE redtCode
,B.MENU_NAME menuName --메뉴이름
,B.MENU_PRICE menuPrice --메뉴 가격
FROM TB_REST_INFO A INNER JOIN TB_MENU B ON(A.REST_CODE = B.REST_CODE)
WHERE 1=1
AND REST_NAME LIKE '%' || '식당1' || '%';