专为高三考生提供有价值的资讯

当前位置:当书网大学介绍大学动态with as 用法

with as 用法

时间:2021-07-31保存为WORD
专题:with用法

WITH AS短语,也叫做子查询部分(subquery factoring),可以让你做很多事情,定义一个SQL片断,该SQL片断会被整个SQL语句所用到。有的时候,是为了让SQL语句的可读性更高些,也有可能是在UNION ALL的不同部分,作为提供数据的部分。

with as 用法

–针对一个别名

with tmp as (select * from tb_name)

–针对多个别名

with

tmp as (select * from tb_name),

tmp2 as (select * from tb_name2),

tmp3 as (select * from tb_name3),

–相当于建了个e临时表

with e as (select * from scott.emp e where e.empno=7499)

select * from e;

–相当于建了e、d临时表

with

e as (select * from scott.emp),

d as (select * from scott.dept)

select * from e, d where e.deptno = d.deptno;

小编推荐

1.mean to do和doing的区别 mean有哪些用法

2.advise的用法和固定搭配

3.health与healthy的用法区别

4.affect与effect用法的区别

5.advice和advise的用法

6.absent用法固定搭配

7.a,an,the的用法区别

8.应用法语学什么课程及毕业薪酬岗位去向 就业前景怎么样

相关文章

Copyright 2019-2029 http://www.dangshu.com 【当书网】 皖ICP备19022700号-7

声明: 本站 所有软件和文章来自互联网 如有异议 请与本站联系 本站为非赢利性网站 不接受任何赞助和广告