Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active December 30, 2021 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garystafford/5c7700a770faea19edf253ab1609c733 to your computer and use it in GitHub Desktop.
Save garystafford/5c7700a770faea19edf253ab1609c733 to your computer and use it in GitHub Desktop.
-- first update (birth)
UPDATE public.artists
SET birth_year = 1907
WHERE artist_id = 299;
-- second update (death)
UPDATE public.artists
SET death_year = 1989
WHERE artist_id = 299;
-- third update (middle initial)
UPDATE public.artists
SET name = 'Gerhard M. Bakker'
WHERE artist_id = 299;
-- fourth update (nationality - impacts partitions)
UPDATE public.artists
SET nationality = 'German'
WHERE artist_id = 299;
-- fifth update (birth)
UPDATE public.artists
SET birth_year = 1905
WHERE artist_id = 299;
-- delete
DELETE
FROM public.artists
WHERE artist_id = 299;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment