Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Boolean
2. Boolean
Date and time
Summary

Instruction

Good. We'll start by talking about boolean columns.

The boolean data type stores logical values, i.e., true or false. This data type usually records the answer to a yes/no question like: "Does the user have pets?"

boolean columns are convenient because they require very little space. However, some databases don't have a separate boolean data type; they simulate it using other types.

Exercise

Once Peter released the beta version of his dating website, he noticed there were fake accounts. So Peter wants to introduce a new feature – user verification. For now, let's create a simple table called verification with two columns: user_id (integer) and is_verified (boolean).