top-n 分析的語法:
select [column_list], rownum
from (select [column_list]
from table
order by top-n_column)
where rownum <= n;
select empno,ename,job from
(select rownum rank,empno,ename,job from
(select empno,ename,job from emp order by empno)
where rownum<8
)where rank>3;
同義詞 同義詞是資料庫中乙個物件的別名,可以簡化對物件的訪問
create [public] synonym synonym
for object;
public表示公用同義詞,如果沒有宣告則表示私有同義詞,公用同義詞是所有使用者都可以看到的同義詞,私有同義詞只有建立同義詞的使用者可以看到。
建立employees表的別名.
create synonym s_emp
for hr.employees;
刪除同義詞.
drop synonym s_emp;
oracle學習筆記五
top n 分析的語法 select column list rownum from select column list from table order by top n column where rownum n select empno,ename,job from select rownu...
oracle學習筆記五
top n 分析的語法 select column list rownum from select column list from table order by top n column where rownum n select empno,ename,job from select rownu...
Oracle學習筆記 五
組合集總計 group by with rollup cube grouping sets 子查詢按執行方式分 標準子查詢 關聯子查詢 標準子查詢 巢狀子查詢 標量值查詢 case with then 使用exits查詢 select user id,user name from tb 001 tb...