【发布时间】:2014-10-26 16:36:08
【问题描述】:
我在网上搜索“how to do an Exclusive Between oracle sql”时在网上找到了这个示例代码
Someone was proving that, in Oracle, BETWEEN 默认包含。
所以他们使用了这样的代码:
with x as (
select 1 col1 from dual
union
select 2 col1 from dual
union
select 3 col1 from dual
UNION
select 4 col1 from dual
)
select *
from x
where col1 between 2 and 3
我从未见过这样的例子,WITH 是怎么回事?
【问题讨论】:
-
称为公用表表达式。搜索该标签
[common-table-expression]这也记录在手册中:docs.oracle.com/cd/E11882_01/server.112/e26088/…
标签: sql oracle common-table-expression