Constraints help us to prevent invalid data entry into tables. Using constraints we can:
There are several constraints are as follows:
Constraint | Description |
---|---|
Not null | Specifies that the column can't contain a null value. |
Unique | Specifies a column or combination of columns whose values must be unique for all rows in the table. |
Primary key | Uniquely identifies each rows of the table. |
Foreign key | Established and enforces a foreign key relationship between the column and a column of the referenced table. |
Check | Specifies a condition that must be true. |
All constraints are stored in data dictionary. Constraints are easy to refer if we give them meaningful names. If we dont give a name to a constraint , the server gives a name by its own.
Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.
We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc