Day 3 Notes
Day 3 Notes
Constraints are the rules that we can apply on the type of data in a table.
That is, we can specify the limit on the type of data that can be stored in
a particular column in a table using constraints. It ensures the reliability,
consistency and accuracy of the data in the table. It helps create
meaningful databases, as there always some restrictions and rules that
you would want to impose on the data being entered in the database. If
there is any violation between the constraint and the data action, the
action is aborted.
The available constraints in SQL are: