6. 입사일이 81/04/02보다 늦고 82/12/09보다 빠른 사원의 이름, 월급, 부서번호를 출력할 때

김미숙's avatar
Jul 15, 2025
6. 입사일이 81/04/02보다 늦고 82/12/09보다 빠른 사원의 이름, 월급, 부서번호를 출력할 때

내가 입력한 코드

select ename, sal, deptno, hiredate from emp where '81/04/02' < hiredate < '82/12/09';
notion image
💡
입사일 조건을 설정할 때 '81/04/02' < hiredate < '82/12/09' 라고 넣으면 조건이 실행되지 않는다
작성할 때 and로 이어주기!
'81/04/02' < hiredate and hiredate< '82/12/09'

🛠 해결

select ename, sal, deptno, hiredate from emp where '81/04/02' < hiredate and hiredate < '82/12/09';
notion image
Share article

parangdajavous