select sname,dept
from student
where exists
(select *
from enrol
where sno = student.sno
and cno='c312' and grade='A');
select sname, s.dept
from student s, enrol e, course c
where s.sno=e.sno and c.cno=e.cno
and cname='자료구조' and grade='A'
select sno
from student
where year=1
union
select sno
from enrol
where cno = 'c324'
select sno
from student
where year=1
intersect
select sno
from enrol
where cno = 'c324'
insert
into computer(sno,sname,year)
select sno,sname,year
from student
where sno=3703 and '서정회' and year=3
select *
from computer;
'Study > Oracle' 카테고리의 다른 글
10.06.10 DB 실습 (0) | 2011.09.03 |
---|---|
10.05.26 DB 실습 (0) | 2011.09.03 |
10.04.28 DB 실습 (0) | 2011.09.03 |
10.06.08 DB 수업 (0) | 2011.09.03 |
10.06.01 DB 수업 (0) | 2011.09.03 |