zoukankan      html  css  js  c++  java
  • oracle中结果集的交集、并集、差集组合查询

    1.交集

    intersect:返回查询结果集中的共同部分。

        SELECT student_id,student_name FROM student_table1
        INTERSECT  
        SELECT student_id,student_name FROM student_table2

    2.差集
    minus:返回第一个结果集中存在而第二个结果集中不存在的部分结果集。

      SELECT student_id,student_name FROM student_table1
      MINUS  
      SELECT student_id,student_name FROM student_table1

    3.并集
    a>  union/union all:将两个结果集合并,合并结果没有过滤重复内容

        SELECT student_id,student_name FROM student_table1
        UNION ALL   
        SELECT student_id,student_name FROM student_table1

    b>union:将两个结果集合并,去掉相同的部分结果集,去重

        SELECT student_id,student_name FROM student_table1
        UNION  
        SELECT student_id,student_name FROM student_table1

  • 相关阅读:
    python shellcod加载器修改特征值
    python shellcode 分析二
    python shellcode分析
    Hadoop综合大作业1
    Hadoop综合大作业
    分布式文件系统HDFS
    安装Hadoop
    爬虫综合大作业
    爬取全部的校园新闻
    理解爬虫原理
  • 原文地址:https://www.cnblogs.com/sunshine5683/p/12289782.html
Copyright © 2011-2022 走看看