SELECT
SELECT [DISTINCT | UNIQUE | ALL]
{[schema.]{table. | view. | snapshot.}* |
expr [[AS] alias][,expr [[AS] alias] ...] |
*
FROM {schema.{table[@dblink] |
            table PARTITION (partition) |
            table SUBPARTITION (subpartition) |
            table SAMPLE [BLOCK] sample_percent |
            view[@dblink] | 
            snapshot[@dblink] |
            (subquery) 
    } [table_alias]
    [,{schema.{table[@dblink] |
            table PARTITION (partition) |
            table SUBPARTITION (subpartition) |
            table SAMPLE [BLOCK] sample_percent |
            view[@dblink] | 
            snapshot[@dblink] |
            (subquery) 
} |
        }[table_alias]
        ...]
[WHERE condition]
[GROUP BY {expr[,expr ...] |
            CUBE (expr[,expr ...]) |
            ROLLUP (expr[,expr ...])
            } 
            [HAVING condition]
[[START WITH condition] CONNECT BY condition]
[{UNION [ALL] | INTERSECT | MINUS} {subquery)
 [,{UNION [ALL] | INTERSECT | MINUS} {subquery) ...]]
[ORDER BY {expr
						| position
						| alias} [ASC | DESC]
 [, {expr | position | alias} [ASC | DESC] ...]
[FOR UPDATE [OF schema.{table | view].column[,schema.{table | view].column ...]
    [NOWAIT]

Retrieves data from tables, views, or snapshots.

Keywords

DISTINCT

Specifies that only one copy of a row should be returned, even if there are duplicate rows. A duplicate row is one that returns the same values for all columns listed in the SELECT list.

ALL

Specifies that all rows should be returned, including duplicates. This option is the default.

schema

The name of the schema containing the table or view. If omitted, the current userid is assumed.

table

Specifies the name of a table.

view

Specifies the name of a view. ...

Get Oracle SQL: the Essential Reference now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.