WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

SQL NOT NULL Constraint


this is a table column can hold NULL values.


SQL NOT NULL Constraint

The NOT NULL constraint enforces a column to NOT accept NULL values.

The NOT NULL constraint enforces a field to always contain a value. We cannot insert a new record, or update a record without adding a value to this field.

The following SQL enforces the "User_Id" column and the "FirstName" column to not accept NULL values:

Example

CREATE TABLE PersonsNotNull
(
User_Id int NOT NULL,
FirstName varchar(255) NOT NULL,
UserName varchar(255),
Email Address varchar(255),
Password varchar(255)
)