zoukankan      html  css  js  c++  java
  • Oracle SQL Lesson (8)

    集合操作符
    UNION/UNION ALL
    INTERSECT
    MINUS

    Union All不排序,不去重,其余均升序且去重。
    create table e1 as select * from emp where deptno in (10,20);
    create table e2 as select * from emp where deptno in (20,30);

    select * from e1 union select * from e2 order by 8
    select * from e1 union all select * from e2 order by 8
    select * from e1 intersect select * from e2 order by 1 desc
    select * from e1 minus select * from e2 order by 1 desc

    SELECT location_id, department_name "Department",
    TO_CHAR(NULL) "Warehouse location"
    FROM departments
    UNION
    SELECT location_id, TO_CHAR(NULL) "Department",
    state_province
    FROM locations;

    SELECT employee_id, job_id,salary
    FROM employees
    UNION
    SELECT employee_id, job_id,0
    FROM job_history;

  • 相关阅读:
    jQuery工具函数
    jQuery中的Ajax
    jQuery动画效果
    jQuery基础事件
    jQuery操作DOM和CSS函数
    jQuery基础DOM和CSS操作
    jQuery过滤选择器
    jQuery常规选择器
    -3dB的理解
    诺顿定理概述
  • 原文地址:https://www.cnblogs.com/thlzhf/p/3404804.html
Copyright © 2011-2022 走看看