Skip to content

parse error  #68

Open
Open

Description

@xinlushi

func main() {
sql := "SELECT * FROM table WHERE a = 'abc'"
stmt, err := sqlparser.Parse(sql)
if err != nil {
fmt.Printf("%s",err.Error())
}

// Otherwise do something with stmt
switch stmt := stmt.(type) {
case *sqlparser.Select:
	_ = stmt
case *sqlparser.Insert:
}

fmt.Printf("stmt :%v", stmt)

}

result err: syntax error at position 20 near 'table'

Activity

  1. bramp commented on Sep 10, 2021

    @bramp
    Collaborator
  2. xinlushi commented on Sep 13, 2021

    @xinlushi
    Author

    Please replace the example, this is the code of the example

  3. Mrsandman327 commented on Nov 14, 2022

    @Mrsandman327

    There is a table in the database ‘information_schema’ as ‘tables’, this problem causes this table to be accessed abnormally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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