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
Explain steps of normalization?
Do you know what is replace and stuff function in sql server?
What is stored in the mssqlsystemresource database? : sql server database administration
How to test a dml trigger in ms sql server?
What is lock escalation? : sql server database administration
How to set the current database in ms sql server?
What is function of master database?
What is the difference between grant and with grant while giving permissions to the user?
How to provide default values to stored procedure parameters?
What is difference between commit and rollback when used in transactions?
What is the difference between cartesian product and cross join?
Define the one-to-one relationship while designing tables.
How except clause is differs from not in clause?
Some queries related to SQL
State a few properties of relational databases?