Skip to content

[FEATURE] cannot parse DESC table_name #1931

Closed
@joonyung

Description

@joonyung

Grammar or Syntax Description

  • DESC table_name

SQL Example

DESC table_name

ERROR MESSAGE

net.sf.jsqlparser.JSQLParserException: net.sf.jsqlparser.parser.ParseException: Encountered unexpected token: "DESC" "DESC"
    at line 1, column 1.

Was expecting one of:

    "("
    "ALTER"
    "ANALYZE"
    "BEGIN"
    "CALL"
    "COMMENT"
    "COMMIT"
    "CREATE"
    "DECLARE"
    "DELETE"
    "DESCRIBE"
    "DROP"
    "EXEC"
    "EXECUTE"
    "EXPLAIN"
    "GRANT"
    "IF"
    "INSERT"
    "MERGE"
    "PURGE"
    "RENAME"
    "REPLACE"
    "RESET"
    "ROLLBACK"
    "SAVEPOINT"
    "SET"
    "SHOW"
    "TRUNCATE"
    "UPDATE"
    "UPSERT"
    "USE"
    "VALUE"
    "VALUES"
    "WITH"
    <K_SELECT>

Additional context

DESC TABLE and EXPALIN TABLE cannot be parsed.
Only DESCRIBE TABLE is successfully parsed, although they are all synonyms to each other. (in MySQL)
Thank you very much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions