Triggers
What is the difference between triggers and constraints?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Abhishek KumarRank #510 · 4.8K reputationPosted Aug 26, 2014, 2:40 AM EDT
A trigger is sql statement execute either before or after an update, insert, or delete in a database.
Triggers uses magic tables(inserted,deleted).
Triggers gives good performance.
Constraints :
A check is a piece of SQL which makes sure a condition is satisfied before action can be taken on a record.
Constraints are used to maintain the integrity and atomicity of database.
constraints are of these types NOT NULL,PRIMARY KEY,FOREIGN KEY,UNIQUE KEY and CHECK.
Hope this helps.
Abhishek