Created
September 28, 2012 14:48
-
-
Save fulippo/3800324 to your computer and use it in GitHub Desktop.
Update di una tabella con select sulla stessa tabella
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment