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 / jerry joseph
Restricting the input using CONSTRAINT will have better
performance but there is a limit to the types of constraints
which we can provide..
With TRIGGERS you have more flexibility and provide a more
variety restrictions to the input.. for example you can
prevent a normal delete and make it a soft delete by setting
an IsDeleted flag using trigger.. we cant have that kind of
flexibility using Constraints..
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is an indexed view?
how to invoke a trigger on demand? : Sql server database administration
What is an indexing strategy?
What is the difference between function and stored procedure in sql server?
What is database black box testing?
How do you delete a data source?
Define tool Manage Statistics in SQL Server 2000 query ?
How except clause is differs from not in clause?
Does sql server 2000 clustering support load balancing?
What is the use of stored procedure?
what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
What is transaction server explicit transaction?
Can you always create a cache of a report?
Can you create a logon trigger in sql server 2005 express edition?
How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?