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
Define cross join in sql server joins?
What is the temp table?
When would you use a before or after trigger?
What is the syntax for encrypting a column in SQL Server?
How many types of schemas are there?
What is database isolation in sql server? : sql server database administration
How can you ensure that the database and sql server based application perform well?
What is difference between index seek vs. Index scan?
Explain full-text query in sql server?
You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?
What is row_number()?
What is user-defined multi-statement table-valued function?
Why we use trigger in sql server with example?
Does partitioning ssd reduce performance?
How can we determine what objects a user-defined function depends upon?