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 are cursors? : Sql server database administration
If we delete pack Spec what will be the status of pack Body ?
What is compound operators?
Detail about query optimizer?
Explain what are various ways to enhance the ssrs report?
What is a with(nolock)?
Explain “@@rowcount” and “@@error” in sql server?
What is a db view?
What is temporal data type?
Explain the disadvantages/limitation of the cursor?
What is the difference between varchar and nvarchar datatypes?
Why use triggers?
What are clustered and non-clustered index?
How to encrypt data between dialogs?
Explain what are the restrictions that views have to follow? : SQL Server Architecture