Try this:
UPDATE data_table t, (SELECT DISTINCT ID, NAME, VALUE
FROM data_table
WHERE VALUE IS NOT NULL AND VALUE != '') t1
SET t.VALUE = t1.VALUE
WHERE t.ID = t1.ID
AND t.NAME = t1.NAME
More Related Contents:
- Out of memory Microsoft VBScript runtime error 800a0007
- MySQL how to fill missing dates in range?
- Left Outer Join doesn’t return all rows from my left table?
- How can i optimize MySQL’s ORDER BY RAND() function?
- Are table names in MySQL case sensitive?
- How to split the name string in mysql?
- Get table names using SELECT statement in MySQL
- ERROR 1396 (HY000): Operation CREATE USER failed for ‘jack’@’localhost’
- Can a foreign key reference a non-unique index?
- How to raise an error within a MySQL function
- Storing Data in MySQL as JSON
- How to set a maximum execution time for a mysql query?
- MySQL select statement with CASE or IF ELSEIF? Not sure how to get the result
- SQL keys, MUL vs PRI vs UNI
- How do I retrieve my MySQL username and password?
- Can’t Create Entity Data Model – using MySql and EF6
- LOAD DATA LOCAL INFILE gives the error The used command is not allowed with this MySQL version
- MySQL root password change
- How do you debug MySQL stored procedures?
- Schrödingers MySQL table: exists, yet it does not
- MySQL: How to select records for this week?
- ld: library not found for -lzstd while bundle install for mysql2 gem Ruby on macOS Big Sur 11.4 Apple M1
- How to migrate SQL Server database to MySQL? [closed]
- how to cast the hexadecimal to varchar(datetime)?
- MySQL Select Query – Get only first 10 characters of a value
- Rank() over Partition by in mysql
- Trouble with GROUP_CONCAT and Longtext in MySQL
- How to pass a variable to a IN clause?
- Optimistic locking in MySQL
- Insert and set value with max()+1 problems