Database Management System (DBMS) / SQL(STRUCTURED QUERY LANGUAGE)

How to create table in SQL?

🔹 Suppose You Want to Track Tasks

Here’s a typical Notion task table:

ID

Task Name

Status

Due Date

Priority

Done

1

Finish Flexbox

In-Progress

2025-07-30

High

✅

2

Watch Grid Video

To-Do

2025-07-28

Medium

❌


🔍 Explanation of Each Column

Column

Type

Why It’s Used

TaskID

INT

Unique identifier (like Notion ID)

TaskName

VARCHAR

Stores text

Status

VARCHAR

Could be ‘To-Do’, ‘Done’, etc.

DueDate

DATE

Like Notion’s calendar view

Priority

VARCHAR

‘High’, ‘Medium’, ‘Low’ etc.

Done

BOOLEAN

TRUE/FALSE (✓/✗) checkbox type


✅ Summary:

To create a Notion-like table in SQL:

  1. Use VARCHAR for text fields

  2. Use DATE for due dates

  3. Use BOOLEAN for checkboxes

  4. Use Status or Priority fields for dropdowns