开发者社区> 问答> 正文

oracle的“不满足”某个条件该怎么写

已解决

比如,我想写一个语句
insert into t1(t1.a,t1.b)
select (t2.a,t2.b) from t2 “不满足”
(t2.a=t1.a and t2.b=t1.b);
以上,求大神解惑。

展开
收起
51干警网 2016-02-17 22:01:33 3264 0
1 条回答
写回答
取消 提交回答
  • 阿里云论坛版主,QQ 1978638808
    采纳回答

    参照下这个
    insert into student(sname,sage) select t2.cname,t2.cid from course t2 where not exists
    (select 1 from student t1 where t1.sname = t2.cname and t1.sage = t2.cid);

    2019-07-17 18:29:14
    赞同 展开评论 打赏
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
PostgresChina2018_樊文凯_ORACLE数据库和应用异构迁移最佳实践 立即下载
PostgresChina2018_王帅_从Oracle到PostgreSQL的数据迁移 立即下载
Oracle云上最佳实践 立即下载

相关镜像