Reputation: 15940
I am getting the following error when I am executing the following statement
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
<---
Can any one please help me with this
Upvotes: 1
Views: 50
Reputation: 72636
You don't have to close the statement with the GO
keyword in MySQL, you have to close it with the semicolon ;
You have also to put backtick around any field name that could contain reserved keywork or capitalized field.
Upvotes: 1
Reputation: 254926
match
is a reserved mysql keyword, you need to enclose it with backticks
`match`
Upvotes: 1