Skip to content

Parser rejects valid INSERT ... SELECT syntax #288

@ajitpratap0

Description

@ajitpratap0

Description

INSERT INTO users (id) SELECT id FROM other fails with error E2002 "expected VALUES, got SELECT".

INSERT ... SELECT is standard SQL supported by all major databases. The parser currently only expects VALUES after INSERT INTO.

Reproduction

sql := "INSERT INTO users (id) SELECT id FROM other"
_, err := parser.Parse(sql)
// Returns: E2002 "expected VALUES, got SELECT"

Expected

Parser should accept INSERT ... SELECT as valid SQL and produce an appropriate AST node.

Impact

Critical — INSERT ... SELECT is extremely common in ETL, data migration, and general SQL usage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingparser

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions