which will fire first ? Trigger or Constraint
Answer Posted / radha sri seshu.kolla
I THINK TRIGGER FIRES FIRST, BCZ WHEN U WRITE A TRIGGER
LIKE 'BEFORE INSERT ON EMP' EVENT. THIS TRIGGER WILL FIRE
IMMEDEATELY BEFORE THE DATA IS ABOUT TO INSERT IN THE
TABLE.WHERE AS IN THE CASE OF CONSTRAINTS, WHEN YOU INSERT
THE DATA,THE DATA GOES FOR CONSTRAINT VALIDATION THEN THE
DATA WILL BE REJECTED(IF THE DATA VIOLATES THE CONSTRAINT
RULE). I AM NOT 100% SURE. THIS IS JUST MY IMAGINATION.
| Is This Answer Correct ? | 11 Yes | 5 No |
Post New Answer View All Answers
Who is the owner of mysql database?
what is sql? : Sql dba
How exception handling is done in advance pl/sql?
What are all the ddl commands?
How to disable a trigger name update_salary?
What is sql indexing?
how mysql optimizes distinct? : Sql dba
What is varchar example?
What is the usage of when clause in trigger?
Why we use join in sql?
What is dbo in sql?
what is sub-query? : Transact sql
Which type of cursor is used to execute the dml statement?
What are different types of queries in sql?
How do you know if a relationship is 2nf?