Constraints

  • Primary key:

    A Primary key constraint is a column or a set of columns that uniquely identify a row in the table.

  • Unique Key:

    A Unique constraint requires that each entry in a particular column be unique. Each table can have 249 unique constraints.

  • Foreign Key:

    A Foreign key constraint consists of a column or a set of columns that participates in a relationship with a primary key table.

  • Default:

    A Default constraint is a value the SQL Server automatically places in a particular field in a table. A Default value can be a constant, Null or a function.

  • Check:

    A Check constraint is used to limit the values that can be placed in a column. The check constraints are used to enforce domain integrity.

  • Not Null:

    A Not Null constraint enforces that the column will not accept null values. The not null constraints are used to enforce domain integrity, as the check constraints.

  • Rule:

    A Rule constraint ensures that you can apply rules to multiple tables, where as a Check constraint applies only to the table for which you enter them.

0 comments :

Post a Comment

> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger