Created
February 19, 2014 19:06
-
-
Save ccarrasc/9099237 to your computer and use it in GitHub Desktop.
(MS) SQL example to copy a row in a table and replace the value in a specific column
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
INSERT INTO table (c1, c2, c3) | |
(SELECT 'new c1', c2, c3 | |
FROM table | |
WHERE c1 = 'old c1') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment