1

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

1

2 Answers 2

1

match is a reserved mysql keyword, you need to enclose it with backticks

`match`
Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.