【发布时间】:2016-02-09 15:33:53
【问题描述】:
这是我的代码:
INSERT INTO aggregate_summary (sampler_label,aggregate_report_count,average,aggr
egate_report_median,aggregate_report_90%_line,aggregate_report_min,aggregate_rep
ort_max,aggregate_report_error%,aggregate_report_rate,aggregate_report_bandwidth
,aggregate_report_stddev) VALUES ("2010 sf1","238","276","16","224","2","3121","
0.0","55.04162812210916","249.6223837881591","766.5325177049589"), ("TOTAL","238
","276","16","224","2","3121","0.0","55.04162812210916","249.6223837881591","766
.5325177049589")
我收到此错误:
ERROR 1064 (42000):您的 SQL 语法有错误;检查 与您的 MySQL 服务器版本相对应的手册 在 'egate 附近使用的语法 _report_median,"aggregate_report_90%_line",aggregate_report_min,aggregate_r' 在第 1 行
谁能帮我找出问题谢谢!
【问题讨论】:
-
标识符无效,在 aggregate_report_90%_line 等周围使用反引号
-
根据您的问题判断,您的代码已被证明为 80 列并带有硬换行符...
-
%是数学模运算符,因此您的字段名称是完全非法的。 -
您不能在标识符中间放置空格(例如回车)。这使它成为 两个 标识符,它们都不存在。将您的代码格式化为人类可读的,作为奖励,查询解析器将更容易理解它。
标签: mysql sql mysql-error-1064