A
A
Apostrophe42019-07-16 21:00:02
MySQL
Apostrophe4, 2019-07-16 21:00:02

Adding a number to the table using INSERT writes an error?

There is a reputation column, I want to add numbers there, but something doesn't work.
Writing:

INSERT INTO users (reputation) VALUES
(500),
(324);

And it’s understandable because I need to go to a specific place, then I thought that I could also twist WHERE, but something went wrong.
INSERT INTO users (reputation) VALUES WHERE id = 1
(500),
(324);

5d2e1093a8740361945779.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Samsonov, 2019-07-16
@Apostrophe4

UPDATE needed here
UPDATE users SET reputation = 500 WHERE id = 1;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question