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
How do you run a query?
Why are aggregate functions called so?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
What are the indexing methods?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
What is sql in oracle?
What is snowflake sql?
How is a PL/SQL code compiled?
what are myisam tables? : Sql dba
What is the usage of the distinct keyword?
Is pl sql still used?
What is delete command in sql?
what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba
Is sql database free?
Can a procedure in a package be overloaded?