Last active
January 13, 2021 12:35
-
-
Save simonthompson99/663170b607a418498ebc83a4b6dfdd0c to your computer and use it in GitHub Desktop.
[Update table from lookup] Update a db table using list of values #sql #database
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 schema.table t | |
set cola = u.cola | |
from | |
( | |
select * from (values | |
(1, 'fdjkl'), | |
(2, 'reiuuio'), | |
(3, 'adfgd') | |
) as t (id, cola) | |
) u | |
where t.id = u.id | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment