0
INSERT INTO Participant (Password) VALUES ('768YcnaDG') WHERE ParticipantID = 1048 

I'm trying to do an insert into SQL command with a where clause. There is an error message that says incorrect syntax near where. How would I go about fixing this?

1 Answer 1

3

Presumably, you want UPDATE, not INSERT:

UPDATE Participant SET Password = '768YcnaDG' WHERE ParticipantID = 1048; 

INSERT adds an entirely new row into the table. UPDATE modifies the values of one or more columns.

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.