Created
June 9, 2015 16:18
-
-
Save thomasklemm/be5435eac637fc0f5a32 to your computer and use it in GitHub Desktop.
Postgres SET using a CASE statement
This file contains hidden or 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 media_images | |
SET collectively_manage_publication_for_all_locales = ( | |
CASE | |
WHEN ((published_de = published_en) AND (published_from_de = published_from_en)) | |
THEN TRUE | |
ELSE FALSE | |
END | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment