what is Constraint? How many types of constraints in SQL ?
Answer Posted / pandia rajan
A constraint is a property assigned to a column or the set
of columns in a table that prevents certain types of
inconsistent data values from being placed in the column
(s). Constraints are used to enforce the data integrity.
This ensures the accuracy and reliability of the data in
the database
CONSTRAINT=The threat or use of force to prevent, restrict,
or dictate the action or thought of others.
there are 7 types of constraints are there and they are
grouped in to 4 types. They are
TYPES GROUP
1.DEFAULT = DOMAIN INTEGRITY
2.NOT NULL = DOMAIN INTEGRITY
3.CHECK = DOMAIN INTEGRITY
4.FOREIGN KEY = REFERENTIAL INTEGRITY
5.UNIQUE KEY = ENTITY INTEGRITY
6.PRIMARY KEY = DOMAIN INTEGRITY
7.RULE = USER DEFINED INTEGRITY
| Is This Answer Correct ? | 8 Yes | 10 No |
Post New Answer View All Answers
Are semicolons required at the end of sql statements in sql server 2005?
How you can change a cross join into an inner join?
How to insert data into an existing table?
Can two tables have the same primary key?
What is a Join and explain its types?
you have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem? : Sql server administration
Where to find ntwdblib.dll version 2000.80.194.0?
What is difference between foreign key and unique key?
How to generate random numbers with the rand() function in ms sql server?
What is default constraint in ms sql server?
How to create indexed view?
What are the differences between stored procedure and view in sql server?
What does COMMIT command do?
What are scalar functions in sql?
Which are ddl commands?