What is the difference between constraints and triggers?
Answer Posted / harshad more
Constraints are great at maintaining database integrity for
database fields and relationships between database tables.
Triggers are great for checking past vs. current values and
making decisions based on that data.
In my experience, it is usually much more favorable to use
constraints when possible and leave the trickier business
and auditing logic for use in triggers.
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Differentiate between sql temp table vs table variable?
What is nonclustered index with included columns ?
How to change the password of a login name in ms sql server?
What action plan is preferred if sql server is not responding?
What are the parts of a function?
Does partitioning ssd reduce performance?
How do I start and stop sql server?
How to create a view on an existing table in ms sql server?
What are types of subqueries?
How to delete multiple rows with one delete statement in ms sql server?
What is the difference between DATETIME2 and DATETIME?
Characterize join and name diverse sorts of joins?
What is scrollable cursor?
Does index speed up select statements?
What happens if null values are involved in bitwise operations?