데이터 베이스 쿼리문 작성 리포트
본 자료는 2페이지 의 미리보기를 제공합니다. 이미지를 클릭하여 주세요.
닫기
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
해당 자료는 2페이지 까지만 미리보기를 제공합니다.
2페이지 이후부터 다운로드 후 확인할 수 있습니다.

본문내용

m max_4;
| snum |
| 2001002 |
| 2001004 |
| 2001010 |
| 2001017 |
| 2001019 |
| 2001022 |
| 2001024 |
mysql>select student.sname from student inner join max_4 using (snum);
| sname |
| andy |
| garvey |
| john |
| gale |
| kennedy |
| mike |
| gunther |
6. Find the names of students who are not enrolled in any class.
-어떤수업도 없는 학생들의 이름을 찾아라.
create temporary table temp_1(sname char(15), cname char(7));
-temp_1이라는 테이블을 작성,단 sname과 cname이 키로 설정
insert into temp_1 select sname, cname from student left outer join enrolled using (snum);
-temp_1테이블에 snum을 이용하여 left outer join하여 sname과 cname을 삽입
select * from temp_1 where cname is null;
-cname없는 것을 찾아서 학생들 이름을 추출함.
mysql> create temporary table temp_1(sname char(15), cname char(7));
mysql> insert into temp_1 select sname, cname from student left outer join enrolled using (snum);
mysql> select * from temp_1 where cname is null;
sname | cname |
| michel | NULL |
| betty | NULL |
| bill | NULL |
| michle | NULL |
| bush | NULL |
| andrew | NULL |
| garland | NULL |
7. Find the names of faculty members who has no class.
-반을 가지고 있지않는 선생님들의 이름을 찾으시오.
create temporary table noclass_1
(fname char(10), cname char(7));
-fname,cname을 키로 갖는 noclass_1라는 테이블을 작성
insert into noclass_1 select fname, cname from faculty left outer join class using (fid);
-noclass_1테이블에 fname과 cname을 삽입 ( faculty에서 fid를 사용해 left outer join함)
select * from noclass_1 where cname is NULL;
-cname이 없는 선생님들의 이름을 선택해라.
mysql> create temporary table noclass_1(fname char(10), cname char(7));
mysql> insert into noclass_1 select fname, cname from faculty left outer join class using (fid);
mysql> select * from noclass_1 where cname is NULL;
| fname | cname |
| john | NULL |
| bush | NULL |
| peter | NULL |
| eric | NULL |
| bill | NULL |
| andrew | NULL |
| betty | NULL |
  • 가격1,300
  • 페이지수8페이지
  • 등록일2004.08.28
  • 저작시기2004.08
  • 파일형식한글(hwp)
  • 자료번호#264387
본 자료는 최근 2주간 다운받은 회원이 없습니다.
청소해
다운로드 장바구니