Skip to main content

Posts

Showing posts with the label SQL Constraints

SQL Constraints, NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK, DEFAULT, CREATE INDEX

SQL Constraints (Image by - Sharma Guides | Subham232330) Constraints   |   |- CHECK   |   |- NOT NULL   |   |- UNIQUE   |   |- PRIMARY KEY   |   |- DEFAULT   |   |- FOREIGN KEY   |   |- INDEX * These constraints are also known as Integrity Constraints . * SQL Constraints:- Constraints are the rules and restrictions applied to the data in a table. * NOT NULL:- Value cannot be Null in a column. * UNIQUE:- Value cannot be the same in a column. * PRIMARY KEY:- Used to uniquely identify a row. * FOREIGN KEY:- References a row in another table. * CHECK:- Satisfies a specific condition. * DEFAULT:- Set default value. * CREATE INDEX:- Used to speed up the reading process.