What do we mean by Check Constraint in Sql Server?

 Posted by vishalneeraj-24503 on 9/1/2014 | Category: Sql Server Interview questions | Views: 270 | Points: 40
Answer:

A check constraint is a rule that identifies acceptable column values for data in a row within a SQL Server table.In other words, we can say that,the Check Constraint is used to validate or limit the value range given that can be placed or marked on a column. Actually a CHECK constraints determine the valid values from a logical expression that is not based on data in another column.
Note:-1).If we define a Check Constraint on a single column,then it allows only certain values for this column.
2).If we define a Check Constraint on a table,then it can limit the values in certain columns based on values in other columns in the row.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response