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 does executeupdate return?
Write a sql query to display the current date?
Explain what is sql server english query?
what are the reporting service components in SSRS?
Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?
How to provide column names in insert statements in ms sql server?
explain extended properties
What are subqueries in sql server? Explain its properties.
What are the difference between “where” and “having” clause in sql server?
how many type of indexing in database?
Can I disable or restrict ssrs export formats (rendering formats)?
Explain features of analysis services?
What is the difference between row_number and dense_rank?
which table keeps the locking information? : Sql server administration
What are parameterized reports? What are cascading parameters in ssrs reports?