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
Sql technical questions
Does execute immediate commit?
How do I know if I have sql express or standard?
What is having clause in sql?
What's the difference between a primary key and a clustered index?
What is a variable in sql?
When can we use the where clause and the having clause?
What is #table in sql?
what is normalization? : Sql dba
What is procedure in pl sql?
Can I create table without primary key?
What is procedure and function in sql?
Why cannot I use bind variables in ddl/scl statements in dynamic sql?
What is a trigger in sql?
Can delete statement be rollbacked?