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
How to copy the tables, schema and views from one sql server to another?
What is 2nf normalization?
Explain timestamp datatype?
Mention the different authentication modes in sql server.
How many types of subqueries are there in sql server?
Can a stored procedure call itself or recursive stored procedure? How much level sp nesting is possible?
How do I start sql server?
How many partitions a clustered index has by default in sql server 2012?
What is catalog views?
What is a Join and explain its types?
Why is the need for data conversion transformations?
What is transact-sql language?
Can we call future method from trigger?
How do you improve the performance of a SQL Azure Database?
Explain what are various ways to enhance the ssrs report?