加入收藏 | 设为首页 | 会员中心 | 我要投稿 PHP编程网 - 黄冈站长网 (http://www.0713zz.com/)- 数据应用、建站、人体识别、智能机器人、语音技术!
当前位置: 首页 > 百科 > 正文

Oracle插入if not exists语句

发布时间:2021-05-22 23:27:49 所属栏目:百科 来源:网络整理
导读:insert into OPT (email,campaign_id) values('mom@cox.net',100)where not exists( select * from OPT where (email ="mom@cox.net" and campaign_id =100)) ; Error report: SQL Error: ORA-00933: SQL command not properly ended 00933. 00000 – “SQ

insert into OPT (email,campaign_id) values('mom@cox.net',100)
where not exists( select * from OPT where (email ="mom@cox.net" and campaign_id =100)) ;

Error report: SQL Error: ORA-00933: SQL command not properly ended
00933. 00000 – “SQL command not properly ended”
*Cause:
*Action:

如何在Oracle中不存在新行?

insert into OPT (email,campaign_id) 
select 'mom@cox.net',100
from dual
where not exists(select * 
                 from OPT 
                 where (email ="mom@cox.net" and campaign_id =100));

(编辑:PHP编程网 - 黄冈站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读