SQL Constraint: NOT NULL
In this video we will see below topics -
Constraints are used to specify the rules for the data.
It ensures the data accuracy.
Limit the type of data that inserted into a table.
If there is any violation between constraints, then the action is aborted
NOT NULL - Ensures that a column cannot have a NULL value.
Syntax:
CREATE TABLE tbl_name (
column1 data_type NOT NULL,
... );
OR
ALTER TABLE tbl_name
ALTER COLUMN column1 data_type NOT NULL
Connect me on Instagram for any queries -
/ thisisanandyadav