what is Constraint? How many types of constraints in SQL ?

Answer Posted / bimaleswar patel

Constraints are used to limit the type of data that can go
into a table.
two basic types of constraints are there
1.column level
2.table level
the difference is that column level constraints are apply
only to one column where as table level constraints are
apply to whole table
Constraints are declare at the time of table creation using
CREATE TABLE command

there are 6 constraints used in oracle
1.NOT NULL
2.UNIQUE
3.PRIMARY KEY
4.CHECK
5.DEFAULT
6.REFERENCES

Is This Answer Correct ?    96 Yes 24 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When cursors are useful?

793


What is ms sql server triggers?

736


What is the difference between varchar and nvarchar datatypes?

784


What is the difference between lock, block and deadlock? : sql server database administration

805


Which are the new data types introduced in sql server 2008?

698


New concepts of sql server 2005 use in your project.

2117


What is sql profiler. What are the default templates with it? : sql server database administration

734


What is the command used to check locks in microsoft sql server?

759


List out the different types of locks available in sql server?

740


Differentiate between ms sql server reporting services vs crystal reports?

697


How to insert multiple rows with a subquery?

761


What happens if an integer is too big for int date type?

764


How do I shrink an ldf file?

767


What specific conditions database should meet, before you can bulk copy data into it using bcp?

771


Explain different types of index?

800