• 集合操作


    select employee_id, job_id from employees

    union all

    select employee_id, job_id from job_history;

     

    select employee_id, job_id from employees

    union

    select employee_id, job_id from job_history;   没有重复值 触发排序

     

    select employee_id, job_id from employees

    intersect

    select employee_id, job_id from job_history;

     

    select employee_id from employees

    minus

    select employee_id from job_history;

     

    select employee_id, job_id, salary from employees

    union all

    select employee_id, job_id, null from job_history;

     

    select employee_id, job_id, to_char(salary) from employees

    union all

    select employee_id, job_id, 'no salary' from job_history;

     

    集合排序:

    select employee_id, job_id, salary from employees

    union all

    select employee_id, job_id, null from job_history

    order by salary;

     

    select employee_id, job_id, null from job_history

    union all

    select employee_id, job_id, salary from employees

    order by 3;

  • 相关阅读:
    【8-21】java学习笔记03
    【每天一点点】
    【8-20】java学习笔记02
    【8-19】java学习笔记01
    【8-18】JS学习01
    【8-17】HTML测试
    Selenium之WebDriverWait
    Selenium之XPATH定位方法
    Fiddler用法
    微服务架构系统的测试
  • 原文地址:https://www.cnblogs.com/shan2017/p/7294991.html
Copyright © 2020-2023  润新知