SQL Error # 1064

Trying to enter a value in the mediumblob field in the mySQL table, but I get:

1064 - You have an error in the SQL syntax; check the manual corresponding to the version of MySQL server for the correct syntax to use next to "WHERE id = 40" on line 3

INSERT INTO 'Picture'
VALUES (efvr)
WHERE id = 40 

What is wrong with this statement and how can it be corrected?

+3
source share
1 answer

You cannot have a WHERE clause on an INSERT. If you are trying to modify an existing row, you need to use UPDATE.

+5
source

Source: https://habr.com/ru/post/1769242/


All Articles