Which is better in performance - CONSTRAINT or TRIGGER over
a column which restricts say an input of particular value
in a column of a table?
Answer Posted / monal
Constraints gets evaluated before statement can be either
inserted or deleted or updated. While trigger executes
after or at the same time statement is executing. So if you
have to roll back transactio because transaction not
meeting condition there is no overhead when you are using
constraint ,but if you have to roll back transaction and
you have a trigger on that table or column either 1
transaction goes through before rolling back. So basically
trigger consumes more resources.
| Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
What happens if an integer is too big for int date type?
List types of tables in SQL Azure?
What is data source view or dsv? : sql server analysis services, ssas
What stored by the model?
Define candidate key, alternate key, and composite key.
Tell me something about security and sql azure?
What are the different types of normalization?
Why union all is faster than union?
Should you normalize audio?
What is merge statement?
How to create a local temporary stored procedure?
What is the meaning of resultset type_scroll_insensitive?
What is inline table-value user-defined function?
How will you go about resolving deadlocks?
How to disable a login name in ms sql server?