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
what is bdb (berkeleydb)? : Sql dba
Show code of a cursor for loop.
What is foreign key and example?
what is the difference between char and varchar data types? : Sql dba
What is an alias command?
Can we call a function containing dml statements in a select query?
What is execution plan in sql?
What is coalesce in sql?
Are stored procedures faster than queries?
What are the most important characteristics of pl/sql?
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
What is the command used to fetch the first 5 characters of a string?
How many parts of a pl sql block are optional?
What is a record in pl/sql?
how many columns can be used for creating index? : Sql dba