Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Defining columns with DEFAULT
5. DEFAULT – Creating tables
Adding DEFAULT to existing tables
Summary

Instruction

Well, the values have been set to NULL because this is what the user wanted. As you can see, the DEFAULT constraint does not prevent NULL values in the given column. It only provides a value when the user does not mention the specific column in their instructions.

Exercise

Using the template as a guide, create the card_game table on your own. Add these DEFAULT constraints: the value 2 for min_players, the value 60 for min_time, and FALSE for cooperation. Give it a try!