Resolved: Why add NOT NULL clause in sales table?
in SQL / Creating a 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)
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.
Submit an answer
Why did you not do not null, primary key and auto increment for customer id in the solution?
Resolved: foreign key : able to see foreign key in the table sales DDL tab , but the Foreign Keys tab is empty