SQL constraints

FOREIGN KEY – Ensure the referential integrity of the data in one table to match values in another table
CHECK – Ensures that the value in a column meets a specific condition
NOT NULL – It will not accept NULL value.
DEFAULT – Specifies a default value for a column
UNIQUE – Ensures that each row for a column must have a unique value
PRIMARY KEY – A combination of a NOT NULL and UNIQUE. Ensures that a column have a unique identity which helps to find a particular record in a table more easily and quickly

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *