SQL NOT NULL: The NOT NULL constraint enforces a column to NOT accept NULL values. This means a column with not null always needs to have a value. This means that you cannot insert a new record, or update a record without adding a value to this field
Example:
CREATE TABLE employee
(
Emp_id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)
(
Emp_id int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Address varchar(255),
City varchar(255)
)

0 Comments:
Post a Comment