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

What happens if null values are involved in boolean operations?

553


Mention the differences between substr and charindex in sql server.

515


How to write character string constants or literals in ms sql server?

536


What languages bi uses to achieve the goal?

509


What is Sqlpaging in SqlServer 2005 ?

658






What happens if you are trying to access a schema not owned by you?

508


What is difference between cte and view?

520


What is a trace frag?

637


what are the different types of SSRS reports?

112


What is the advantage of sql server?

534


What is a trigger what are the advantages of trigger?

524


If user is owning any SQL Objects, can we drop that user

1602


How do you set a trace flag in sql server?

549


What does the on delete cascade option do?

546


What is difference between unique and primary key?

477