Firebird Documentation IndexFirebird 2.0.6 Release NotesData Manipulation Language (DML) → SELECT Statement & Expression Syntax
Firebird Home Firebird Home Prev: Data Manipulation Language (DML)Firebird Documentation IndexUp: Data Manipulation Language (DML)Next: New Reserved Words and Changes

SELECT Statement & Expression Syntax

Dmitry Yemanov

About the semantics

Syntax rules

  <select statement> ::=
    <select expression> [FOR UPDATE] [WITH LOCK]

  <select expression> ::=
    <query specification> [UNION [{ALL | DISTINCT}] <query specification>]

  <query specification> ::=
    SELECT [FIRST <value>] [SKIP <value>] <select list>
    FROM <table expression list>
    WHERE <search condition>
    GROUP BY <group value list>
    HAVING <group condition>
    PLAN <plan item list>
    ORDER BY <sort value list>
    ROWS <value> [TO <value>]

  <table expression> ::=
    <table name> | <joined table> | <derived table>

  <joined table> ::=
    {<cross join> | <qualified join>}

  <cross join> ::=
    <table expression> CROSS JOIN <table expression>

  <qualified join> ::=
    <table expression> [{INNER | {LEFT | RIGHT | FULL} [OUTER]}] JOIN <table expression>
    ON <join condition>

  <derived table> ::=
    '(' <select expression> ')'
    

Conclusions

Notes

Prev: Data Manipulation Language (DML)Firebird Documentation IndexUp: Data Manipulation Language (DML)Next: New Reserved Words and Changes
Firebird Documentation IndexFirebird 2.0.6 Release NotesData Manipulation Language (DML) → SELECT Statement & Expression Syntax