1.创建表
2.查询
3.结果
[img]http://dl.iteye.com/upload/attachment/199269/53381a32-22e7-3346-a86e-d87d5a165558.jpg[/img]
Create Table temp
(
num varchar2(15 Char),
name varchar2(20 Char),
sex varchar2(2 Char),
classes varchar2(30 Char),
course_name varchar2(50 Char)
)
insert into temp(num,name,sex,classes,course_name) values ('206211','王艺','男','06-1班','保险学');
insert into temp(num,name,sex,classes,course_name) values ('206212','肖薇','女','06-2','保险学');
insert into temp(num,name,sex,classes,course_name) values ('206212','肖薇','女','06-2','财务管理');
insert into temp(num,name,sex,classes,course_name) values ('206212','肖薇','女','06-2','财务会计');
insert into temp(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','电子商务');
insert into temp(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','公共经济学');
insert into temp(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','公司理财');
insert into temp(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','管理学原理');
insert into temp(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','保险学');
insert into temp(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','保险学');
insert into temp(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','财务管理');
insert into temp(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','财务会计');
insert into temp(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','电子商务');
insert into temp(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','公共经济学');
insert into temp(num,name,sex,classes,course_name) values ('206215','杨伊琳','女','06-3班','环境管理学');
insert into temp(num,name,sex,classes,course_name) values ('206215','杨伊琳','女','06-3班','管理学原理');
insert into temp(num,name,sex,classes,course_name) values ('206215','杨伊琳','女','06-3班','商务谈判');
insert into temp(num,name,sex,classes,course_name) values ('206216','李佳琪','男','06-2','土地估计');
Commit;
Create Table temp12
(
num varchar2(15 Char),
name varchar2(20 Char),
sex varchar2(2 Char),
classes varchar2(30 Char),
course_name varchar2(50 Char)
)
insert into temp12(num,name,sex,classes,course_name) values ('206211','王艺','男','06-1班','保险学');
insert into temp12(num,name,sex,classes,course_name) values ('206212','肖薇','女','06-2','保险学');
insert into temp12(num,name,sex,classes,course_name) values ('206212','肖薇','女','06-2','财务管理');
insert into temp12(num,name,sex,classes,course_name) values ('206212','肖薇','女','06-2','财务会计');
insert into temp12(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','电子商务');
insert into temp12(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','公共经济学');
insert into temp12(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','公司理财');
insert into temp12(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','管理学原理');
insert into temp12(num,name,sex,classes,course_name) values ('206213','陈雅诗','女','06-2','保险学');
insert into temp12(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','保险学');
insert into temp12(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','财务管理');
insert into temp12(num,name,sex,classes,course_name) values ('206214','李丹阳','男','06-1','财务会计');Commit;
2.查询
select * from temp minus select * from temp12
3.结果
[img]http://dl.iteye.com/upload/attachment/199269/53381a32-22e7-3346-a86e-d87d5a165558.jpg[/img]