chetana bhargav
<bhargav_chetana-/[EMAIL PROTECTED]> wrote:
 If two tasks create two seperate triggers each of its own, on the
 same condition each not caring whether already a trigger exists, and
both of them had opened a session, now if the trigger is fired which
one will be notified?

First, triggers are parts of the database, just like tables or indexes. They are not private to a connection (though you can create a temporary trigger, then it will be private as every connection has its own TEMP database). Just like you cannot create two tables with the same name, you cannot create two triggers with the same name - the second CREATE TRIGGER statement will fail. If you create two triggers on the same table and condition (necessarily with different names), both will run.

Second, triggers don't notify anybody. When a trigger fires, the trigger's body is executed, which is just a sequence of SQL statements. These statements are executed in the context of the connection that got the trigger to fire in the first place.

Igor Tandetnik

Reply via email to