Created
April 24, 2019 19:26
-
-
Save clebersonfalk/ea9dabd86018eba380a72a50e189fae1 to your computer and use it in GitHub Desktop.
MySQL Update Join Concat
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 desk_24.fases_processuais fp1 | |
INNER JOIN desk_24.fases_processuais fp2 ON(fp2.id = fp1.id) | |
SET fp1.resumos = IF(fp2.resumos IS NULL,'13,14,15,16,17,18,19',CONCAT(fp2.resumos, ',13,14,15,16,17,18,19')) | |
WHERE fp1.id IN(90,91,92); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment