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

Which command is used for user defined error messages?

573


What happens to a trigger with multiple affected rows?

536


Explain what are the events recorded in a transaction log?

569


Can you name a few encryption mechanisms in sql server?

547


What is a benefit of using an after insert trigger over using a before insert trigger?

526






How to include date and time values in sql statements?

638


What is catalog views?

616


What is clustered vs nonclustered index?

514


What is default constraint in ms sql server?

542


Explain about system stored procedure?

609


Explain the third normal form(3nf)?

527


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

551


How to create sub reports?

194


How to connect of datebase with sql express.?

635


Explain primary key and foreign key constraints?

527