Answer the question
In order to leave comments, you need to log in
How it is? Did the Update command Truncate the tables?
20 Update requests, I wanted to optimize them. To merge these 20 requests into one, the WHEN - THEN construct was used. Late, fatigue, mistake.
As a result of the query, all values in the brand_sku_increment table disappeared!
Yes, everything was restored, but I can not understand how this could happen. When there is a syntax error, an error warning is displayed and the command simply fails.
UPDATE brand_sku_increment SET `sku_brand`= CASE
WHEN product_sku = 'G-60019 THEN '00006-1'
WHEN product_sku = 'G-40015' THEN '00001-1'
......
END
WHERE 1
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question