2016 - 2024

感恩一路有你

python集合运算符 数据库关系运算?

浏览量:2087 时间:2021-03-13 06:00:28 作者:admin

数据库关系运算?

A 并 B 去掉重复记录----unionselect empno, ename ,salary ,deptno from employee_ccy where deptno=10 union select empno, ename ,salary ,deptno from employee_ccy where salary>100--union all 不排序,不去重复 select empno, ename ,salary ,deptno from employee_ccy where deptno=10 union all select empno, ename ,salary ,deptno from employee_ccy where salary>100---交集-----intersect select empno, ename ,salary ,deptno from employee_ccy where deptno=10 intersect select empno, ename ,salary ,deptno from employee_ccy where salary>100--差集--------minus select empno, ename ,salary ,deptno from employee_ccy where deptno=10 minus select empno, ename ,salary ,deptno from employee_ccy where salary>100-------------用两个结果集的差集 ,获得select deptno,dname ,location from department_ccy where deptno in(select deptno from department_ccy minusselect distinct deptno from employee_ccy )希望对你有帮助

python集合运算符 数据库基本运算符 集合运算符

版权声明:本文内容由互联网用户自发贡献,本站不承担相关法律责任.如有侵权/违法内容,本站将立刻删除。