You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
funccreateTableSQL(db*sql.DB, namestring) (string, error) {
// Get table creation SQLvartable_return sql.NullStringvartable_sql sql.NullString// fix it like this,thankserr:=db.QueryRow("SHOW CREATE TABLE `"+name+"`").Scan(&table_return, &table_sql)
iferr!=nil {
return"", err
}
iftable_return.String!=name {
return"", errors.New("Returned table is not the same as requested table")
}
returntable_sql.String, nil
}
The text was updated successfully, but these errors were encountered:
rhettli
changed the title
if table name is "order" it will report an error,show add char `` to table
if table name is "order" it will report an error,should add char `` to table
Dec 8, 2022
such as sql:
SHOW CREATE TABLE
`order`
# okSHOW CREATE TABLE order # error
here is code below:
The text was updated successfully, but these errors were encountered: