使用Oracle特有的查詢語法
如下
create table tree (
id number(
name varchar
super number(
);
select * from tree start with id = ? connect by id = prior super
select * from tree start with id = ? connect by prior id = suepr
select * from tree start with super =
select * from (
select my_table
select name
) my_table where rownum <
) where my_rownum >=
select empno
EMPNO ENAME SAL RESULT
select decode(grouping(deptno)
decode(grouping(job)
sum(sal) sal
from emp
group by ROLLUP(deptno
DEPTNO JOB SAL
all deptno all job
當多表連接很慢時
SELECT /**//*+ ORDERED */*
FROM a
WHERE
From:http://tw.wingwit.com/Article/program/Oracle/201311/18916.html