Skip to content
RaspPywriter edited this page Jun 28, 2020 · 14 revisions

This page will focus on Oracle-specific syntax

ROWNUM

Returning a specified number of rows.

Example of ROWNUM

SELECT * from WHERE ROWNUM <= 5;

You can't use ROWNUM = 5 due to how Oracle processes the request, however, if you only want one row returned you can use ROWNUM = 1.

All_Tab_Columns

Listing a table's columns select column_name, data_type, column_id from all_tab_columns where owner = 'SMEAGOL' and table_name = 'EMP'

SUM OVER()

ROLLUP

grouping

TO_CHAR

LAST_DAY

TRUNC

ADD_MONTHS

Dual table

TO_NUMBER

NEXT_DAY

LEAD OVER

LAG OVER

ROW_NUMBER OVER

DENSE RANK()

PARTITION BY

CONNECT BY

WITH

SYS_CONNECT_BY_PATH

MODEL

Clone this wiki locally