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
What is the role of UNIQUE constraint ? How is PRIMARY KEY constraint different from UNIQUE constraint ?
What is primary key ? What is PRIMARY KEY constraint ?
When a column's value is skipped in an INSERT command, which value is inserted in the database ?
Can a column defined with NOT NULL constraint, be skipped in an INSERT command ?