Oracle的with子句的用法
2009-03-05 17:57
316 查看
用with子句的好处:
使用 WITH 子句, 可以避免在SELECT 语句中重复书写相同的语句块
WITH 子句将该子句中的语句块执行一次并存储到用户的临时表空间中
使用 WITH 子句可以提高查询效率
例子:
with
temp_from as (select * from test1),
temp_where as (select testid from test2)
select * from temp_from
where exists (select testid from temp_where where temp_from.testid = temp_where.testid)
使用 WITH 子句, 可以避免在SELECT 语句中重复书写相同的语句块
WITH 子句将该子句中的语句块执行一次并存储到用户的临时表空间中
使用 WITH 子句可以提高查询效率
例子:
with
temp_from as (select * from test1),
temp_where as (select testid from test2)
select * from temp_from
where exists (select testid from temp_where where temp_from.testid = temp_where.testid)
相关文章推荐
- Oracle学习之start with...connect by子句的用法
- Oracle中start with...connect by子句的用法
- Oracle中start with...connect by子句的用法
- ORACLE start with… connect by prior 子句用法
- Oracle中start with...connect by子句的用法
- Oracle的with子句的用法
- Oracle中start with...connect by 子句的用法
- Oracle start with ... connect by prior 用法
- 关于oracle with table as的用法
- Oracle start with connect by prior 递归查询用法
- oracle权限with admin option和with grant option的用法
- ORACLE WITH AS 用法
- oracle start with connect by 用法
- with..as oracle的用法
- oracle 下WITH CHECK OPTION用法
- Oracle 的 start with connect by 用法
- Oracle WITH AS 用法
- Oracle start with connect by prior 用法(递归查询树形结构)
- oracle start with connect by 用法