Created
April 12, 2018 03:04
-
-
Save monaye/84f9768010d23844e9faa28a331adc04 to your computer and use it in GitHub Desktop.
Update column value based on same table's row of other column value
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 | |
| tableA | |
| SET | |
| columnA = SUB.columnB | |
| FROM | |
| ( select id, columnB FROM tableA ) as SUB | |
| WHERE | |
| tableA.id = SUB.id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment