您的位置:首页 > 数据库 > Oracle

oracle--with as

2016-06-16 12:01 387 查看
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返回不能不写啊!!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: