Skip to content

rename sql to string seems not available #27

@WangXiangUSTC

Description

@WangXiangUSTC

I use sqlparser parse sql, and the code is below:

    sql := "rename table a to b;"
    tree, err := sqlparser.Parse(sql)
    if err != nil {
            fmt.Println("sql parser failed!")
            return
    }
    out := sqlparser.String(tree)
    fmt.Println(out)

the output is : "rename table a b",
the sql can't run success in mysql, forget add the "to"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions