Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
CHECK constraints with a simple condition
4. CHECK – updating rows
CHECK constraints with complex conditions
Adding CHECK constraints to existing tables
Summary

Instruction

Superb! As you can see, all the values were in accordance with our CHECK constraints, so we inserted the row successfully. But what if we change some values?

Exercise

Try to update a row in the video_game table. Pick the row with the name 'Grand Theft Auto V' and change the price to -2. What do you think will happen?

Stuck? Here's a hint!

Syntax reminder:

UPDATE ...
SET ...
WHERE ...;