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


Please Help Members By Posting Answers For Below Questions

What is intellisense?

585


Define views.

590


What are sparse columns?

584


What are the 10 characteristics of data quality?

527


What is the name of reporting services config file and what’s it’s used for?

107






What is RAID? What are the different types of RAID configurations?

612


Explain different forms of normalization?

530


Tell me what do you understand by a view? What does the with check option clause for a view do?

639


What are SSL and TSL protocols?

580


What are the differences between lost updates and uncommitted dependencies?

539


what's the difference between a primary key and a unique key? : Sql server database administration

499


Tell me what is normalization? Explain different forms of normalization?

543


What is blocking?

569


Define normalisation?

675


When is the use of update_statistics command?

553