fix keyword bug

This commit is contained in:
zhuyasen
2024-06-24 00:12:56 +08:00
parent a432349483
commit 92be671b11
3 changed files with 3 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ func GetMysqlTableInfo(dsn, tableName string) (string, error) {
}
defer db.Close() //nolint
rows, err := db.Query("SHOW CREATE TABLE " + tableName)
rows, err := db.Query("SHOW CREATE TABLE `" + tableName + "`")
if err != nil {
return "", fmt.Errorf("query show create table error, %v", err)
}