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
Explain about analysis services?
What is a linked server in sql server?
What is transact-sql ddl trigger?
Where does the copy job runs in the log shipping primary or secondary? : sql server database administration
what are triggers? : Sql server database administration
Explain how long are locks retained within the repeatable_read and serializable isolation levels, during a read operation with row-level locking?
What is SQL Azure?
How to stop a loop early with break statements in ms sql server?
What are the different types of cursor?
What is log cache in sql server?
Give main differences between "Truncate" and "Delete".
What is the fillfactor concept in indexes?
What is bit data type?
What is a transact-sql statement?
What are the three different part of rdl file explain them?