oracle中集合操作,Oracle 集合操作

—-

EMP  DEPT SALGRADE   bonus

N   N-1

scott—-loc

SCOTT—GRADE

t1  省份  城市   景区

t2  省份  城市   小吃

select  jq,xc from t1,t2 where t1.sf=t2.sf and t1.cs=t2.cs

cross join

natural join

inner join   –using  on

(left right  full )outer join

–where

set 操作     集合操作

1—列的数量要一样,如果不一样,用null填充

2—列的名字以第一个集合为准

3—列的数据类型要一样,如果不一样,用 to_char to_number to_date去转换

和scott在同一部门,并且工资比他低的都是谁?

SQL> select em1.ename from emp em1 where sal

SQL> select ename from emp where deptno=(select deptno from emp where ename=’SCOTT’) and sal

SQL> select ename from emp,(select deptno ,sal from emp where ename=’SCOTT’) e2  where emp.deptno=e2.deptno and emp.sal

和scott在同一部门,并且职位也一样的都是谁?

伪劣 伪列

desc emp

select ss from emp;

rownum

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值