what is the difference between trigger and constraint?
Answer Posted / milind chopde
1) Constraints can be used for validation but trigger can be used for complex validation and auditing purpose.
2) Trigger is database object but constraint not.
3) Trigger can be fired on DDL commands but constraints are created or altered using DDL commands.
4) Trigger can be fired on particular event like before/after DML but constraint always check before any data insert or update to table.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Does sql profiler affect performance?
What's the procedure?
What is loop in pl sql?
how can we know the number of days between two given dates using mysql? : Sql dba
What is sql and how does it work?
what is the difference between $message and $$message? : Sql dba
what are the differences between char and varchar? : Sql dba
How to start oracle sql developer?
What is procedure explain with program?
What are transaction and its controls?
What is %s in sql?
Is sql the best database?
how do you know the version of your mysql server? : Sql dba
What is sqlexception in java?
What is query syntax?