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


Please Help Members By Posting Answers For Below Questions

I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that

1663


What is usually the first word in a sql query?

828


Explain the difference between HTTP and HTTPS in database?

756


How to list all user defined functions in the current database?

702


What are different types of statement?

680


Why olap is used?

728


Explain different types of index?

781


What stored by the msdb?

784


Describe in brief system database.

754


What is lock escalation and what is its purpose?

728


Explain the relational database management system (rdbms)?

778


What is the order in which the sql query is executed?

712


Different types of keys in SQL?

832


What is the difference between a "where" clause and a "having" clause?

849


What does sql server mean?

704