Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Primary keys – the basics
Single-column primary keys
Multi-column primary keys
NOT NULL
24. NULL in ERD diagrams
Review

Instruction

Excellent! The last thing we want to show you about the NULL constraint is the way we mark it in ERD diagrams. Take a look:

LEAD

Have you noticed the N signs on the right? Using these signs, we can stress that a certain column may be NULL. N means that the column is NULLable.

Exercise

Use the ERD diagram to write the proper instructions for creating the table.

LEAD

Stuck? Here's a hint!

Type:

CREATE TABLE rpg_game (
  id integer PRIMARY KEY,
  name varchar(32) NOT NULL,
  genre varchar(32) NOT NULL,
  classes_no integer NULL,
  complexity integer NULL,
  min_players integer NULL
);