Last answered:

11 Nov 2022

Posted on:

10 Nov 2022

1

Resolved: Why add NOT NULL clause in sales table?

since we are using a PRIMARY KEY clause for the purchase_num column in sales table then why do we use the NOT NULL clause?

1 answers ( 1 marked as helpful)
Instructor
Posted on:

11 Nov 2022

1

Hi Somil!
Thanks for reaching out.

It will work if you don't specify the NOT NULL constraint. It is not mandatory. We have used it to specify we are not willing to have any missing data in the respective column.

Hope this helps.
Best,
Tsvetelin

Submit an answer