What is the difference between constraints and triggers?

Answer Posted / sairam singh

Both will be used to implement business rules.

Constraints will do memory location to table comparision.
where as triggers will do table to table comparision.
for this triggers will use magic tables(inserted,deleted).

In the order of precedence first Constraints next Triggers,
But performance wise triggers will give best performance
because table to table comparision is faster than memeory
location to table comparision.

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what authentication modes does sql server support? : Sql server database administration

722


What are three major types of constraints?

745


What is the difference between having clause and where clause in sql server?

796


What are the components of sql server service broker?

695


What are different types of database indexes?

700


what are the types of indexes? : Sql server database administration

814


Is it true, that there is no difference between a rule and a check constraint?

710


How can you check the version of sql server?

790


Define indexes?

805


What is normalization of database?

780


Can you insert NULL in unique column?

845


What is report rendering ?

131


Explain sql delete command?

803


What are the underflow and overflow behaviors on float literals?

807


What will be the maximum number of index per table?

725