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 the difference between explicit and implicit cursors in oracle?
What is record variable?
How do I view a sql trace file?
Mention what is the function that is used to transfer a pl/sql table log to a database table?
How are functions and procedures called in PL/SQL?
what does the t-sql command ident_current does? : Transact sql
what is auto increment? : Sql dba
What is cursor and why it is required?
Is primary key an index?
Do foreign keys improve performance?
What is full join?
what is offset-fetch filter in tsql? : Transact sql
what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba
What are the set operators in sql?
What is synonyms?