Skip to content

Instantly share code, notes, and snippets.

@alimozdemir
Last active June 6, 2020 21:03
Show Gist options
  • Save alimozdemir/413458fc08cf0aab02071317b9a430aa to your computer and use it in GitHub Desktop.
Save alimozdemir/413458fc08cf0aab02071317b9a430aa to your computer and use it in GitHub Desktop.
songs update
UPDATE A
SET A.[Status] = @zzz_BatchUpdate_0
FROM [Country_Songs] AS A
INNER JOIN ( SELECT [c].[SongId], [c].[CountryId], [c].[Status]
FROM [Country_Songs] AS [c]
WHERE [c].[SongId] = @zzz_BatchUpdate_1
) AS B ON A.[SongId] = B.[SongId]
AND A.[CountryId] = B.[CountryId]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment