Codington
0 of 8 problems solved • 0%

Exercise prompt

Require an Enabled Flag

A default sets the usual value. NOT NULL also protects the column when someone explicitly sends NULL. Put both rules on the same column.

Your task

Create services with id integer followed by enabled boolean. Every service must have an enabled flag, and the default must be true. Insert ID 1 using the default and ID 2 with the flag set to false.

Opening the database…