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
How to implement service broker?
What are different backups available in sql server?
What is trigger explain with program?
Why is sql server log file full?
What is user-defined inline table-valued function?
What are the 10 characteristics of data quality?
What is 3nf normalization?
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
Do you know how to send email from database?
While you are inserting values into a table with the insert into .. Values option, does the order of the columns in the insert statement have to be the same as the order of the columns in the table?
List out different types of normalizations in sql server and explain each of them?
What is candidate key with example?
What are triggers? How do you invoke a trigger on demand?
How to list all dsn entries on your local machine using odbc_data_source()?
Can two tables share the same primary key?