1、GROUP BY ROLLUP(a,b):可以实现简单的统计报表,相当于 GROUP BY a,b,再GROUP BY a,再GROUP BY *
2、BREAK ON a SKIP 2:配合着GROUP BY ROLLUP用的,BREAK ON a表示相同的a只显示1次, SKIP 2表示分组之间空2行
3、左外连接/右外连接:MsSQL是LEFT JOIN、RIGHT JOIN,Oracle可以两表联查 FROM a,b,然后 WHERE a.XX(+) = b.XX是RIGHT JOIN, WHERE a.XX = B.XX(+)
时间: 2024-11-11 02:37:18