inblog logo
|
harimmon
    데이터베이스

    [Database] 6. 조건문 case when then end

    백하림's avatar
    백하림
    Feb 25, 2025
    [Database] 6. 조건문 case when then end
    -- 조건문 (if - MySQL, case when - 모든 DB) select if(10>5,"참","거짓"); -- 2500 (고액연봉), (일반연봉) select ename, sal, case when sal>2500 then "고액 연봉" when sal>2000 then '일반 연봉' else "중간 연봉" end '연봉 그룹' from emp;
    notion image
    Share article

    harimmon

    RSS·Powered by Inblog