1

执行以下语句时出现以下错误

INSERT INTO upcoming_matches(
    Id, Date, me_date, Match, team1, team2, 
    Timing, Status, series_id, 
    match_place,series_mtch_type, match_live,match_result, MINI_LINK, 
    PHOTOS_URL, scorecard_ID) 
VALUES(
    764, '2012/03/11', '2012/03/11', 'Bangla vs Pak', '2', '6', 
    '08:00 GMT | 14:00 local 13:30 IST', 1, 171, 
    'Shere Bangla National Stadium, Mirpur', 'ODI', 1, '', '1483',  
    'http://www.cricandcric.com/photo-gallery/', 3258)
GO

[Error] Script lines: 1-5 --------------------------
 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Match, team1, team2, Timing, Status, series_id, match_place,
 series_mtch_type, ' at line 1 

 Warnings: ---> 
   W (1): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Match, team1, team2, Timing, Status, series_id, match_place,
 series_mtch_type, ' at line 1
          <--- 

任何人都可以帮我解决这个问题吗

4

2 回答 2

1

match是一个保留的mysql关键字,你需要用反引号括起来

`match`
于 2012-04-08T08:46:51.610 回答
1

你不必GO在 MySQL 中用关键字关闭语句,你必须用分号关闭它;

您还必须在任何可能包含保留键或大写字段的字段名称周围加上反引号。

于 2012-04-08T08:47:16.460 回答