oracle 数据库所有示例 --有去除功能的 是通过交集做的计算 select sname,sal,sage,sdeptno from student where sdeptno in(20,10) union select sname,sal,sage,sdeptno from student where sdeptno=20 ; --没有去除功能的 (10,20)将全部显示出来 select iname,iage,ideptno from showinfo where ideptno in(10,20)union all select iname,iage,ideptno from showinfo where ideptno=10; --就好比 (20,30)减去30 只剩下20 了一样 结果A减去结果B select sname,sage,sdeptno from student where sdeptno in(20,30)minus select sname,sage,sdeptno from student where sdeptno=30; --编号自增长 insert into student values((select nvl(max(sid),0)+1 from Student),?,?) ----------------------------------------------------------------------------- --以下编号自增长触发器