| Author |
A doubt with triggers
|
vignesh bala
Greenhorn
Joined: Aug 19, 2006
Posts: 28
|
|
Hi all, I have a basic doubt in trigger execution. I am using JDBC to do an insert and a select queries to the same table(I am selecting the same coloumns which i inserted). The insert statement is a trigger which sets proper in the coloums(I have used some default values in insert query). I have a major doubt here. will the trigger fired before the select statement executed or the select will be executed before trigger gets executed.Please help me. I am in urgent need of it. Regards, Vignesh
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26158
|
|
Vignesh, It depends on how you define the trigger. You could have either of these: CREATE TRIGGER my_trigger BEFORE INSERT ... CREATE TRIGGER my_trigger AFTER INSERT ...
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
I agree. Here's the link: jrebel
|
|
subject: A doubt with triggers
|
|
|