What is the difference between constraints and triggers?
Answer Posted / sairam
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 ? | 17 Yes | 8 No |
Post New Answer View All Answers
Can we call future method from queueable?
What is the difference between a stored procedure and a user defined function?
What are the encryption mechanisms in sql server?
Using the customer, and order table in northwind database, please write a query to produce xml?
What are the different Topologies in which Replication can be configured?
What is the sql case statement used for? Explain with an example?
What are different types of raid configurations? : SQL Server Architecture
What are the results of running this script?
What is difference between getdate and sysdatetime in sql server 2008?
What is the order by used for?
How do I create a stored procedure in sql server?
List the different types of collation sensitivities in sql server?
Do you know how to send email from database?
List out what other servers you can use with ssrs?
What command must you use to include the not null constraint after a table has already been created?