码迷,mamicode.com
首页 > 数据库 > 详细

oracle--with as

时间:2016-06-16 13:07:30      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:

with as把一段查询结果放在临时表,后面的查询中可多次使用

语法:

with 别名 as(select * from table)

with 别名1 as(select * from table1),

   .............

   别名n as(select * from tablen)

 

示例:

with 别名 as(select * from table where ....)
select * from 别名

ps:使用with as最后的select返回不能不写啊!!!!

oracle--with as

标签:

原文地址:http://www.cnblogs.com/yhzh/p/5590566.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!