Name

SELECT

Synopsis

SELECT [{DISTINCT | UNIQUE | ALL}]
{ [schema.]{table_name. | view. | snapshot.} 
|  expr [[AS] alias][,expr [[AS] alias] ...] 
| *
}
FROM 
{table_name[@dblink] [AS OF {SCN | TIMESTAMP} expr] 
| table_name PARTITION (partition_name) [AS OF {SCN | TIMESTAMP} expr] 
| table_name SUBPARTITION (subpartition_name) [AS OF {SCN | TIMESTAMP} expr] 
| table_name SAMPLE [BLOCK] sample_percent [AS OF {SCN | TIMESTAMP} expr] 
| view[@dblink] [AS OF {SCN | TIMESTAMP} expr]  
| snapshot[@dblink] [AS OF {SCN | TIMESTAMP} expr] 
| (subquery) 
| table_name 
  { [join_type] JOIN table_name
    { ON condition 
    | USING (column [, column]... )
  | { CROSS JOIN | NATURAL [join_type] JOIN table_name }
  } 
[,[table_alias]
[,table_name[@dblink] [AS OF {SCN | TIMESTAMP} expr] 
| table_name PARTITION (partition_name) [AS OF {SCN | TIMESTAMP} expr] 
| table_name SUBPARTITION (subpartition_name) [AS OF {SCN | TIMESTAMP} expr] 
| table_name SAMPLE [BLOCK] sample_percent [AS OF {SCN | TIMESTAMP} expr] 
| view[@dblink] [AS OF {SCN | TIMESTAMP} expr]  
| snapshot[@dblink] [AS OF {SCN | TIMESTAMP} expr] 
| (subquery) 
| table_name 
  { [join_type] JOIN table_name
    { ON condition 
    | USING (column [, column]... )}
  | { CROSS JOIN | NATURAL [join_type] JOIN table_name }
  }
} 
[table_alias]]
[WHERE condition]
{[GROUP BY {expr | {expr[,expr ...]} 
| CUBE (expr[,expr ...]) 
| ROLLUP (expr[,expr ...]) 
}
GROUPING SETS (
  {expr | {expr[,expr ...]} 
  | CUBE (expr[,expr ...]) 
  | ROLLUP (expr[,expr ...])
  } 
[HAVING condition]
[[START WITH condition] CONNECT ...

Get Oracle in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.