GeekInterview.com
Series: Subject: Topic:
Question: 158 of 165

What is a Trigger ?

 A piece of logic that is executed at or triggered by a SQL *forms event. 
Asked by: Interview Candidate | Asked on: Sep 9th, 2004
Showing Answers 1 - 4 of 4 Answers
maromaro2

Answered On : Nov 12th, 2006

Triggers are a special PL/SQL construct similar to procedures. However, a procedure is executed explicitly from another block via a procedure call, while a trigger is executed implicitly whenever the triggering event happens. The triggering event is either a INSERT, DELETE, or UPDATE command. The timing can be either BEFORE or AFTER. The trigger can be either row-level or statement-level, where the former fires once for each row affected by the triggering statement and the latter fires once for the whole statement.

  
Login to rate this answer.

Trigger in Forms are totaly differ from trigger in oracle.

Forms trigger:  base on 1.  mouse navigation   2. key navigation  3. others

oracle trigger: database tigger ( 13) and application trigger

  
Login to rate this answer.

A forms trigger is a block of PL/SQL code that adds functionality to your
application. Triggers are attached to objects in your application. When a
trigger is fired, it executes the code it contains. Each triggers name defines
what event will fire it; for instance, a WHEN-BUTTON-PRESSED trigger executes
its code each time you click on the button to which the trigger is attached. Or,
we can say, a forms trigger is a set of PL/SQL actions that happen each time an
event such as when-checkbox-changed, when-button-pressed, or
when-new-record-instance occurs. You can attach several triggers to a data
query. The most popular of them are the PRE-QUERY and POST-QUERY.


PRE-QUERY and POST-QUERY trigger


The PRE-QUERY trigger fires before the select statement is finalized. The
POST-QUERY trigger fires before selected records are presented to the user. It
fires after records are retrieved but before they are displayed. So, you can use
it to enhance a querys records in a number of ways. Your Post-Query trigger can
contain code to calculate or populate control items.


PRE-INSERT and WHEN-NEW-FORM-INSTANCE trigger


Some other useful triggers are: PRE-INSERT and WHEN-NEW-FORM-INSTANCE.

A PRE-INSERT trigger fires once before each new record is inserted in a commit
process. The "WHEN-NEW-FORM-INSTANCE" trigger will be used to prepare objects or
an action when entering to a new form. It fires when the form is entered.

  
Login to rate this answer.
Bashartullakhan

Answered On : Aug 17th, 2011

Triggers are a special PL/SQL construct similar to procedures. However, a procedure is executed explicitly from another block via a procedure call, while a trigger is executed implicitly whenever the triggering event happens. The triggering event is either a INSERT, DELETE, or UPDATE command.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.