what is Constraint? How many types of constraints in SQL ?
Answer Posted / shreevats
Constraints are the conditions which allows to restrict the invalid or inconsistent data in the tables.
Types of Constraints
1.Not null:Not null make any column as mandatory and it will not allows the null values.
2.Unique:It will not allows duplicate values.
3.Primary Key:A PK is used to identify a record uniquely in a table.
PK=UNIQUE+NOT NULL
4.Foreign Key or Referential Integrity constraint
:It creates the relationship between any two tables.
5.Check: It is used for enforcing business validation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the source of constraints?
How will you make an attribute not process? : sql server analysis services, ssas
What will be the maximum number of indexes per table?
Explain trigger classes i.e. Instead of and after trigger?
Tell me the use of keyword with encryption. Create a store procedure with encryption?
What do you mean by data manipulation language?
Does server sql treat char as a variable-length or fixed-length column?
Do you know how to make remote connection in database?
Benefits of Stored Procedures?
What are different types of raid configurations? : SQL Server Architecture
Give an example of why you would want to denormalize a database
How to use column default values in insert statements in ms sql server?
Explain the difference between clustered and non-clustered index?
How do I connect to sql server database?
How do I find query history in sql server?