0
 INSERT INTO `2018_players`(`p_id`, `player_fname`, `player_lname`, `stats_id`, `home_id`) VALUES (
  (1, 'LeBron', 'James', 2, 3, 23),
  (2, 'Stephen', 'Curry', 4, 5, 30),
  (3, 'James', 'Harden', 6, 7, 13),
  (4, 'Giannis', 'Antekokounmpo', 8, 9, 34),
  (5, 'Paul', 'George', 10, 11, 13);

Server version: 5.7.23

1 error were found during analysis.

#1064 - 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 '' at line 7

2
  • 1
    You got a parentheses too much, near VALUES Commented Mar 21, 2019 at 21:22
  • 1
    One obvious error is the parenthesis after VALUES, remove it. Commented Mar 21, 2019 at 21:24

1 Answer 1

1

You are specifying 5 columns, but trying to insert 6 values per row, and there is an extra bracket after VALUES, you want something like:

 INSERT INTO `2018_players`(`p_id`, `player_fname`, `player_lname`, `stats_id`, `home_id`, `extra_column`) VALUES 
  (1, 'LeBron', 'James', 2, 3, 23),
  (2, 'Stephen', 'Curry', 4, 5, 30),
  (3, 'James', 'Harden', 6, 7, 13),
  (4, 'Giannis', 'Antekokounmpo', 8, 9, 34),
  (5, 'Paul', 'George', 10, 11, 13);
Sign up to request clarification or add additional context in comments.

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.