Computer Science, asked by sukhman18741, 1 year ago

What is NOT NULL constraint?

Answers

Answered by Anonymous
2

By default, a column can hold NULL values. The NOT NULL constraint enforces a column to NOT accept NULL values. This enforces a field to always contain a value, which means that you cannot insert a new record, or update a record without adding a value to this field.

Answered by ayush7652051895sl
0

Explanation:

  • A table's columns should never have the null value set to them by using the NOT NULL constraint.
  • Any insert or update operation that tries to put a null value into a column that has a NOT NULL constraint declared for it will fail.
  • The NOT NULL constraint makes it mandatory for a column to reject NULL entries.
  • This forces a field to always have a value, so you can't add a new record or update an existing record without giving this field a value.
  • For instance, the statement SELECT * FROM employees WHERE last name IS NOT NULL will retrieve all items from the workers table where the last name field does not contain a null value.

#SPJ6

Similar questions