insert into tbname
select * from tb where not exists(select 1 from tbname where tbname.col=tb.col)
select * from tb where not exists(select 1 from tbname where tbname.col=tb.col)
解决方案 »
- 如何取字段中的连续个数大于某个值的连续数值?
- oracle数据库如何备份还原为成sql server
- 那里有oracle817 for linux or for unixware 下载
- oracle 的sql处理方式
- >>>>> 关于空值(NULL)的比较 <<<<<
- 关于在oracle里用cast的问题
- 在网络中同时访问数据库的问题!
- 在P4windows2000server下安装oracle9i出错了,希望得到诸位的帮助,非常感谢!
- ora-03113错误,如何解决?
- 有没有编译器既能支持c++,又能编译proc的?
- 关于Sql*plus命令 清屏
- oracle 不能起动................
intersece
select userid from TableName
insert into user(userid,password)
select xh,xh from student where not exists (select userid from user
where user.userid=student.xh) ;
对吗?
你好! 如果我上面写的是对的,结果提示 ORA-00001: 索引中有重复的键那是错在哪里啊
select xh,xh from student where not exists(select 1 from user
where user.userid=student.xh) group by xh;
主键是useridto beckhambobo(beckham):
使用group by xh 的用途是什么啊?不用是不是应该一样啊?
select xh,xh from student where not in
(select xh,xh from user
where user.userid=student.xh)