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
What is recompile sql server?
What happens when the SQL Azure database reaches Max Size?
What are the tools available in market as an alternative to sql server reporting services?
What is the difference between indexing and hashing?
Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?
What is meant by indexing?
What structure can you implement for the database to speed up table reads?
What is an execution plan?
What are different types of schemas?
Tell me what do we need queues in sql service broker?
What is a print index?
What is the meaning of resultset type_scroll_insensitive?
What is federation member?
What is data modification?
How to delete a login name in ms sql server?