KnowledgeBoat Logo

Computer Science

What is NOT NULL constraint ? What is DEFAULT constraint ?

DDL & DML

1 Like

Answer

The NOT NULL constraint is used in SQL to ensure that a column cannot contain NULL (i.e., empty) values.

A DEFAULT constraint is used in SQL to specify a default value for a column in a table. When the user does not enter a value for the column (having default value), automatically the defined default value is inserted in the field.

Answered By

1 Like


Related Questions