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 are the new security features added in sql server 2012? : sql server security
What is SQL Azure?
Write a SQL command to insert and update only a particular field?
What is ssrs?
plss anybody specify tha constrian management system in dbms
Name few endpoints exposed by ssrs 2012?
Can a table have 2 primary keys?
How do you identify a foreign key?
What are the differences between user defined functions and stored procedures?
What are dml (data manipulation language) statements in ms sql server?
To automatically record the time on which the data was modified in a table, which data type should you choose for the column?
Explain different forms of normalization?
Define the one-to-one relationship while designing tables.
What is report subscription?
How do I find sql server instance name?