Example of NOT NULL constraint in SQL server-
CREATE TABLE Students (
ID INT NOT NULL,
FirstName VARCHAR(200) NOT NULL,
Age INT);
NOT NULL constraint creation on existing table-
ALTER TABLE Students
ALTER COLUMN Age INT NOT NULL;
Example of NOT NULL constraint in SQL server-
CREATE TABLE Students (
ID INT NOT NULL,
FirstName VARCHAR(200) NOT NULL,
Age INT);
NOT NULL constraint creation on existing table-
ALTER TABLE Students
ALTER COLUMN Age INT NOT NULL;