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

Define clusters?

652


What is the contrast between sql and pl/sql?

626


What is named calculation? : sql server analysis services, ssas

535


explain the storage models of olap? : Sql server database administration

524


What is the difference between Stored Procedures and triggers?

576






How to download and install microsoft sql server management studio express?

565


What are audit control procedures?

589


What is the partitioning method?

538


What are the new features of sql server 2008 r2 reporting service?

110


Why we use the openxml clause?

549


Explain in brief about Microsoft SQL server?

549


what are user defined datatypes and when you should go for them? : Sql server database administration

544


What is the difference between deallocate cursor and close cursor?

726


Can you tell me some of the common replication dmv's and their use? : sql server replication

537


How to count duplicated values in a column in ms sql server?

521