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 number sorts of privileges are accessible in sql?
What are a scheduled jobs or what is a scheduled tasks?
How will you go about resolving deadlocks?
Is it possible to replicate data from sql server to oracle? : sql server replication
How to define and use table alias names in ms sql server?
Explain different types of collation sensitivity?
What is precedence constraint?
Why do you need a sql server?
What is cross join in sql server joins?
What is data source document?
What is difference in performance between insert top (n) into table and using top with insert?
What are the advantages of user defined function?
What is sql server replication? : sql server replication
What is faster join or union?
What are the advantages of passing name-value pairs as parameters?