10.05.04 DB 실습

Study/Oracle 2011.09.03 23:55
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.05.04 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
Posted by 코딩하는 야구쟁이

댓글을 달아 주세요



티스토리 툴바