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 difference between views and stored procedures?
What is repeatable read?
Ways to improve the performance of a SQL Azure Database?
what is database replication? : Sql server database administration
Can sql servers link to other servers?
How to count groups returned with the group by clause in ms sql server?
What are the five characteristics of good data?
Why you need indexing? Where that is stored and what you mean by schema object? For what purpose we are using view?
you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration
How to throw custom exception in Stored Procedure?
What is the process of normalising?
Explain how to integrate the ssrs reports in application?
What are “lost updates”?
How you can get a list of all the table constraints in a database?
What does REVERT do in SQL Server 2005?