-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp277.sql
More file actions
44 lines (32 loc) · 788 Bytes
/
Copy pathp277.sql
File metadata and controls
44 lines (32 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--테이블에 있는 데이터 수정하기
/*
update: 수정할 테이블을 지정
set: 변경할 컬럼의 이름과 데이터를 입력
where: 변경할 데이터를 지정
*/
select * from dept1;
insert into dept1 values(10, 'ACCOUNTING', 'NEW YORK');
insert into dept1 values(20, 'RESEARCH', 'DALLAS');
insert into dept1 values(30, 'SALES', 'CHICAGO');
insert into dept1 values(40, 'OPERATIONS', 'BOSTON');
update dept1
set deptno = 50;
update dept1
set deptno = 50
where dname = 'RESEARCH';
commit;
rollback;
--emp1 테이블 검색
select * from dept1;
select * from tabs;
drop table emp1;--DDL은 auto commit이 된다.
create table emp1
as select * from emp;
select * from emp1;
select * from emp1
order by sal;
/*
update emp1
set comm = 50
where sal < 2500;
*/