SHOW [FULL] COLUMNS FROM

    SHOW [FULL] FIELDS FROM <table_name>DESC <table_name>DESCRIBE <table_name>EXPLAIN <table_name> 语句都是 SHOW [FULL] COLUMNS FROM 的别名。

    ShowStmt:

    ShowColumnsFilterable:

    ShowColumnsFilterable

    FieldsOrColumns:

    FieldsOrColumns

    ShowTableAliasOpt:

    FromOrIn:

    FromOrIn

    ShowDatabaseNameOpt:

    ShowDatabaseNameOpt

    DBName:

    ShowLikeOrWhereOpt:

    ShowLikeOrWhereOpt

    1. Query OK, 0 rows affected (0.11 sec)
    1. show columns from v1;
    1. +-------+-----------+------+------+---------+-------+
    2. | Field | Type | Null | Key | Default | Extra |
    3. | 1 | bigint(1) | YES | | NULL | |
    4. +-------+-----------+------+------+---------+-------+
    5. 1 row in set (0.00 sec)
    1. desc v1;
      1. +-------+-----------+------+------+---------+-------+
      2. | Field | Type | Null | Key | Default | Extra |
      3. +-------+-----------+------+------+---------+-------+
      4. | 1 | bigint(1) | YES | | NULL | |
      5. +-------+-----------+------+------+---------+-------+
      6. 1 row in set (0.00 sec)
      1. explain v1;
      1. +-------+-----------+------+------+---------+-------+
      2. | Field | Type | Null | Key | Default | Extra |
      3. +-------+-----------+------+------+---------+-------+
      4. +-------+-----------+------+------+---------+-------+
      5. 1 row in set (0.00 sec)
      1. | Field | Type | Null | Key | Default | Extra |
      2. +-------+-----------+------+------+---------+-------+
      3. | 1 | bigint(1) | YES | | NULL | |
      4. +-------+-----------+------+------+---------+-------+
      5. 1 row in set (0.00 sec)
      1. show full columns from v1;
      1. +-------+-----------+-----------+------+------+---------+-------+---------------------------------+---------+
      2. | Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
      3. +-------+-----------+-----------+------+------+---------+-------+---------------------------------+---------+
      4. | 1 | bigint(1) | NULL | YES | | NULL | | select,insert,update,references | |
      5. +-------+-----------+-----------+------+------+---------+-------+---------------------------------+---------+
      6. 1 row in set (0.00 sec)