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 a trace frag?
Explain log shipping?
How you can change the database name in SQL SERVER?
Explain the properties of sub-query in sql server?
How do I find the sql server version?
Explain what is the difference between a local and a global temporary table?
What are the new scripting capabilities of ssms? : sql server management studio
How to execute the cursor queries with "open" statements?
What is hot add cpu in sql server 2008?
How to search for a string in all stored procedure in sql server?
What is provisioning, billing and metering, and connection routing concepts in the service layer?
How to run sql server 2005 books online on your local system?
Can you force a query to use a specific index?
Working with TLogs
How do I start and stop sql server?