N/APosted on - 03/30/2016
What does constraints in SQL mean? Which are the different types of Integrity Constraints? What happens if a constraint is violated?
Introduction to constraints in SQL Language
Constraints are some rules/ restrictions specified by the user in order to enter values within a determined range or not allowing the user to enter data containing a particular type of input. There are three types of Integrity constraints:
• Domain Integrity Constraint
• Entity Integrity Constraint
• Referential Integrity Constraint
When any of the constraints mentioned by the database developer are violated, a message appears on the screen saying that a constraint was violated with the name of the constraint that was violated so that the user gets to know what types of values he/she is allowed to enter into the database.