Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Revision
4. Boolean data type - revision

Instruction

Excellent! Let's move on to the smallest data type - boolean. It can only store two values: TRUE or FALSE. Let's do a quick exercise.

Exercise

In the European Grand Star Hotel, there are some rooms with a sauna installed inside the bathroom. Let's make a small table room_sauna with the columns:

  • room_id (integer) and
  • sauna_available (boolean).

Stuck? Here's a hint!

Type

CREATE TABLE room_sauna (
   room_id int,
   sauna_available boolean
);