What is the difference between constraints and triggers?
Answer Posted / sairam
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 ? | 17 Yes | 8 No |
Post New Answer View All Answers
Explain aggregate functions?
What are the steps to insert a table?
What is the difference between update lock and exclusive lock?
Explain the types of indexes.
Can you force a query to use a specific index?
Which tcl commands are available on the sql server?
How can sql injection be stopped? : sql server security
If the job running very slow what is the action you do
What is the guest user account in sql server? What login is it mapped to it? : sql server security
How do I delete a sql server database?
What are the fixed server level roles? : sql server security
Is foreign key unique?
Do you know hot add cpu in sql server 2008?
role of sql sever 2005 in database rather than any other database
What are orphan records?