Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Eureka
- class
- Vector
- constantnumber
- 생성자
- object
- override
- eclipse
- abstractclass
- overload
- start()
- hashCode
- concreteclass
- hamobee
- 추상클래스
- 객체형변환
- arguments
- garbagecollection
- run()
- value
- fuction
- ALTER
- super
- 콘크리트클래스
- reference
- MSA
- string
- Hashtable
- methodArea
- Polymorphism
Archives
- Today
- Total
뇌운동일지
[Oracle] 데이터 갱신과 트랜잭션 제어 연습문제 본문
기본설정
create table enrol1
as select * from enrol ;
create table student1
as select * from student where stu_grade in (1, 2);
create table subject1
as select * from subject ;
select * from enrol1 ;
select * from student1 ;
select * from subject1 ;
1.
insert into student1
values ('20101059', '조병준', '컴퓨터정보', 1, 'B', 'M', 164, 70 ) ;
2.
insert into student1 (stu_no, stu_name, stu_dept, stu_grade, stu_class, stu_gender)
values ('20102038', '남지선', '전기전자', 1, 'C', 'F');
3.
insert into student1 (stu_no, stu_name, stu_dept, stu_grade, stu_class)
values ('20103009','박소신','기계',
(select stu_grade from student1 where stu_no = '2009075'),
(select stu_class from student1 where stu_no = '2009075')) ;
4.
insert into student1
select *
from student
where stu_grade = 3 ;
5.
update student1
set stu_class = 'B'
where stu_no = '20071001' ;
6.
update student1
set stu_height = stu_height + 2
where stu_no = 20072088 ;
7.
update student1
set stu_grade = stu_grade + 1 ;
8.
update student1
set stu_dept = '컴퓨터정보', stu_no = '20061021'
where stu_no = '20062021';
9.
update enrol1
set enr_grade = enr_grade - 10
where sub_no = (select sub_no
from subject1
where sub_name = '전자회로실험');
10.
update enrol1
set enr_grade = 0
where stu_no = (select stu_no
from student1
where stu_no='20061062');
11.
delete from student1
where stu_no = '20093088' ;
12.
insert into subject1
values ('112', '자동화시스템', ' 고종민', 3, '기계') ;
13.
update subject1
set sub_no = 501
where sub_no = 110 ;
14.
delete from subject1
where sub_no = 101 ;
15.
update enrol1
set sub_no = 999
where sub_no not in (select sub_no from subject1) ;
16.
update enrol1
set stu_no = 99999999
where stu_no not in (select stu_no from student1) ;
17.
delete from enrol1
where sub_no = 999 ;
18.
delete from enrol1
where stu_no = 99999999 ;
19.
delete from enrol1
where sub_no not in (select sub_no from subject1) ;
20.
drop table enrol1 ;
'DB > Oracle' 카테고리의 다른 글
[Oracle_tips] ORA-01031: 권한이 불충분합니다 (0) | 2020.05.29 |
---|---|
[Oracle] 데이터 정의어 (DDL; Data Definition Language) (0) | 2020.05.28 |
[Oracle] 데이터 갱신과 트랜잭션 제어 (0) | 2020.05.28 |
[Oracle] join과 subquery 연습문제 (0) | 2020.05.27 |
[Oracle] SubQuery, 집합연산자 (0) | 2020.05.27 |
Comments