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
What is row_number()?
What is a unique index?
Explain log shipping and mention its advantages.
How to create a new schema in a database?
What are the disadvantages of using the stored procedures?
can any body tell me how to know the password of current user in sql server
What do you understand by intent locks?
What are key constraints?
Name some of the open source software that you can use in alternative to SSR?
What is the tcp/ip port on which sql server runs?
How are the unique and primary key constraints different?
What are different types of statements that are supported by sql?
What is the purpose of the master database?
What is user-defined functions? What are the types of user-defined functions that can be created?
What is key set driven?