What is the difference between constraints and triggers?
Answer Posted / sairam singh
Both will be used to implement business rules.
Constraints will do memory location to table comparision.
where as triggers will do table to table comparision.
for this triggers will use magic tables(inserted,deleted).
In the order of precedence first Constraints next Triggers,
But performance wise triggers will give best performance
because table to table comparision is faster than memeory
location to table comparision.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Do you know what are the restrictions applicable while creating views? : SQL Server Architecture
What are the encryption mechanisms in sql server?
What is meant by Active-Passive and Active-Active clustering setup?
How to set database to be read_only in ms sql server?
Delete duplicate rows without using rowid.
How many types of the database links?
Explain the steps to use transact-sql cursor?
Does group by sort data?
What are diverse clauses that form a part of sql?
What are the components of sql server service broker?
List the different index configurations possible for a table?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
Define ACID properties in a Database?
How you can change a cross join into an inner join?
Is sql server difficult to learn?