This is an example of a database update script that is not idempotent.
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
--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