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
Does full backup break log chain?
What are ddl triggers and types of ddl trigger?
What are scalar functions in sql?
Can sql servers link to other servers like oracle?
What are the differences between user defined functions and stored procedures?
Is BCNF better than 2NF & 3NF? Why?
what is a join and explain different types of joins? : Sql server database administration
Explain for xml explicit mode?
What are the steps to insert a table?
What are the differences between clustered and non-clustered index?
How exceptions can be handled in sql server programming?
What is #table in sql server?
How to find table changes in sql server?
Do you know what is normalization of database? What are its benefits?
Difference between DELETE and TRUNCATE?