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 O’Reilly online learning.

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