摘要: group by 擴展 rollup&&cube --按job分組計算不同job的匯總工資 SELECT job, SUM (sal) FROM emp GROUP BY job ORDER BY job; --向rollup傳遞一列 SELECT job, SUM (sal) FROM emp GROUP BY ROLLUP (job) ... 阅读全文
posted @ 2017-02-05 16:54 guilingyang 阅读(169) 评论(0) 推荐(0) 编辑
摘要: --使用connect by和strart with子句 SELECT [level],column,expression, ... FROM table [WHERE where_clause] [[START WITH start_condition] [CONNECT BY prior_condition]]; SELECT empno, ... 阅读全文
posted @ 2017-02-05 14:43 guilingyang 阅读(484) 评论(0) 推荐(0) 编辑