Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is an example of a database update script that is not idempotent.
--this code increases the price of all products
--in the category by 20% each time the script is run
--The result of the script is different each time the script is run.
UPDATE Product
SET Price = Price * 1.2
WHERE CategoryId = 3001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment