Constraints are allows us to enforce
rules in our database. SQL Server supports 6 types of constraints. A
Constraint is a property that we can assign to column in table. By assigning
constraint property on column we can prevent the users to enter inconsistent of
data in columns. We can assign these Constraint properties during the time of
creation of table (By Using CREATE TABLE statement) or during the time of
changing the existing table structure (By Using ALTER TABLE statement)
- Primary Key Constraint
- Unique Key Constraint
- Foreign Key Constraint
- Not Null Constraint
- Check Constraint
- Default Constraint
Comments
Post a Comment