SELECT

    语句用于从 TiDB 读取数据。

    SelectStmt:

    FromDual:

    FromDual

    WhereClauseOptional:

    SelectStmtOpts:

    SelectStmtOpts

    SelectStmtFieldList:

    TableRefsClause:

    WhereClauseOptional:

    WhereClauseOptional

    SelectStmtGroup:

    HavingClause:

    HavingClause

    OrderByOptional:

    SelectStmtLimit

    FirstOrNext:

    FetchFirstOpt:

    FetchFirstOpt

    RowOrRows:

    SelectLockOpt:

    SelectLockOpt

    WindowClauseOptional

    1. Query OK, 0 rows affected (0.11 sec)
    1. Records: 5 Duplicates: 0 Warnings: 0
    1. +----+----+
    2. | id | c1 |
    3. +----+----+
    4. | 1 | 1 |
    5. | 2 | 2 |
    6. | 4 | 4 |
    7. | 5 | 5 |
    8. +----+----+

    SELECT 语句与 MySQL 完全兼容。如发现任何兼容性差异,请在 GitHub 上提交 。