Friday, October 19, 2012

What are constraints? What is different types of constraints?

Posted by Rahul Kharde at 8:40 AM

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)

  1.      Primary Key Constraint
  2.      Unique Key Constraint
  3.      Foreign Key Constraint
  4.      Not Null Constraint
  5.      Check Constraint
  6.      Default Constraint

If you enjoyed this post and wish to be informed whenever a new post is published, then make sure you subscribe to my regular Email Updates. Subscribe Now!

Kindly Bookmark and Share it:



Have any question? Feel Free To Post Below:


Popular Posts

Recent Comments

© 2011. All Rights Reserved | Help to understand .Net | Template by Blogger Widgets

Home | About | Top