Update Blob field?

Good day! Have a database with a field of type blob. In one of the records stored the data I needed and I want these data in all records for this field.
ecd5a3a9b5ba484a9eb2ecea90aaedbe.png

How do I make it so all records had the same value in this field? Tried the usual Update navaneetham set nathanaelb=значение_в_blob that did not help.

I would appreciate the help
July 2nd 19 at 13:59
1 answer
July 2nd 19 at 14:01
If I understand correctly, something like this (table name, columns to substitute your own):
UPDATE table
SET
[blob] = (SELECT [blob] FROM table WHERE id = 555)
WHERE id != 555
UPDATE `phpshop_categories`
SET
`sort` = (SELECT `sort` FROM `phpshop_categories` WHERE id = 7835)
WHERE id != 7835

#1093 - you cannot specify table 'phpshop_categories' in the list of tables FROM to make changes
What is the error? - Adaline commented on July 2nd 19 at 14:04
SET @sort = (SELECT `sort` FROM `phpshop_categories` WHERE id = 7835)
UPDATE `phpshop_categories`
SET
`sort` = @sort
WHERE id != 7835 - halle commented on July 2nd 19 at 14:07
:
Static analysis:

Found 1 error in the analysis.

A new statement was found, but no delimiter between it and the previous one. (near "UPDATE" at position 71)
SQL query: Documentation

SET @sort = (SELECT `sort` FROM `phpshop_categories` WHERE id = 7835) UPDATE `phpshop_categories` SET `sort` = @sort WHERE id != 7835

Answer MySQL: The Documentation

#1064 - you Have an error in the query. Refer to the documentation for the version of MySQL on the subject of correct syntax near 'UPDATE `phpshop_categories`
SET
`sort` = @sort
WHERE id != 7835' at line 2

I apologize in advance, but I'm not very good in mysql - Adaline commented on July 2nd 19 at 14:10
The semicolon between the statements:
SET @sort := (SELECT `sort` FROM `phpshop_categories` WHERE id = 7835) ;
UPDATE `phpshop_categories`
SET
`sort` = @sort
WHERE id != 7835 - halle commented on July 2nd 19 at 14:13

Find more questions by tags SQLMySQL