SELECT BOARD_ID, WRITER_ID, TITLE, PRICE,
CASE
WHEN STATUS = 'SALE' THEN '판매중'
WHEN STATUS = 'DONE' THEN '거래완료'
WHEN STATUS = 'RESERVED' THEN '예약중'
END AS STATUS
FROM USED_GOODS_BOARD
WHERE DATE(CREATED_DATE) = '2022-10-05'
ORDER BY BOARD_ID DESC;
'ㅋㅌ' 카테고리의 다른 글
lastIndexOf() (0) | 2023.12.25 |
---|---|
substring, charAt (0) | 2023.12.22 |
[SQL] JOIN (0) | 2023.09.17 |
[SQL] WHERE 절 안에 WHERE ,,! (0) | 2023.09.14 |
[SQL] 서브쿼리 사용 (0) | 2023.09.12 |