Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
NOT NULL constraint
6. Adding and removing NOT NULL – exercise
Summary

Instruction

Good job! Okay, time for an additional exercise!

Exercise

We have a second table that keeps track of the leaflets designed and distributed by the NGO. The table looks like this:

CREATE TABLE leaflet (
  id integer PRIMARY KEY,
  circulation integer NOT NULL,
  black_and_white boolean,
  distribution_area varchar(32)
);

Your task is to:

  1. Remove the NOT NULL constraint from the circulation column.
  2. Add a NOT NULL constraint to the black_and_white column.

Stuck? Here's a hint!

Use DROP NOT NULL on circulation column and SET NOT NULL on black_and_white column.