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 new changes are being made in SQL Server?
How can you find out which stored procedures are recompiling?
How efficient you are in oracle and SQL server?
What is the difference between a primary key and a unique key? Are they the same?
What is the recommended total size of your memory optimized tables?
What is the purpose of self join?
How to transfer an existing table from one schema to another schema in ms sql server?
What is the contrast amongst drop and truncate?
What is the optimal disk configuration for a database server and what raid configurations would you use if budget is not a constraint?
In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance
What is buffer cash and log cache in sql server?
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
What is mean by dml?
What is an active database?
What are sql server functions?