Previous Topic: SELECT Statement Subselect SyntaxNext Topic: Inner Join Example


SELECT Statement Select-Into Syntax

Following is the SELECT statement's complete select-into syntax with the JOIN syntax as a choice in the FROM clause:

►►─ SELECT ─┬────────────┬────────────────────────────────────────────────────►
            ├─ ALL ◄ ────┤
            └─ DISTINCT ─┘

 ►─┬─ * ────────────────────────────────────────────┬─ INTO ──────────────────►
   │ ┌─ , ────────────────────────────────────────┐ │
   └─▼─┬─ expression ─┬───────────────────────┬─┬─┴─┘
       │              └─ AS ─ sql-identifier ─┘ │
       └─┬─ table-name.* ───────┬───────────────┘
         ├─ view-name.* ────────┤
         └─ correlation-name.* ─┘

   ┌─ , ─────────────┐        ┌─ , ─────────┐
 ►─▼─ host-variable ─┴─ FROM ─▼─ table-ref ─┴─────────────────────────────────►

 ►─┬─────────────────────────┬────────────────────────────────────────────────►◄
   └─ WHEREsearch-condition ─┘