728x90
더보기
Day31. 230613
서브쿼리
수정
7369사원의 커미션을 30번부서에 근무하면서 81/05에 입사하여 2850급여를 받으며
7839상사 밑에서 MANAGER일을 하는 사원의 커미션과 동일하게 수정
1
2
3
4
5
6
|
update emp
set comm = (select comm
from emp
where deptno=30 and to_char(hiredate,'YY/MM')='81/05'
and sal=2850 and mgr=7839 and job = 'MANAGER')
where empno = 7369;
|
cs |
삭제
1
2
3
4
|
delete emp
where empno in(select empno
from emp
where deptno=40 and sal=6600);
|
cs |
삭제되었는지 확인>
1
2
3
4
|
delete emp
where empno in(select empno
from emp
where deptno=40 and sal=6600);
|
cs |
728x90
'개발 수업 > DB' 카테고리의 다른 글
[Oracle/SQL] 테이블 DDL (0) | 2023.06.13 |
---|---|
[Oracle/SQL] 다중테이블 insert (0) | 2023.06.13 |
[Oracle/SQL] VIEW (0) | 2023.06.12 |
[Oracle/SQL] 서브쿼리 (0) | 2023.06.12 |
[Oracle/SQL] JOIN(CROSS JOIN ,EQUI JOIN, NON EQUI JOIN,NATURAL JOIN,INNER JOIN,OUTER JOIN,SELF JOIN) (0) | 2023.06.12 |