Which two statements are correct about the trigger to be created for the above requirement?

You want to create a trigger that fires whenever rows are deleted from the customer table and that
displays the number of rows remaining in the table.
Which two statements are correct about the trigger to be created for the above requirement?
(Choose two.)

You want to create a trigger that fires whenever rows are deleted from the customer table and that
displays the number of rows remaining in the table.
Which two statements are correct about the trigger to be created for the above requirement?
(Choose two.)

A.
It should be an after trigger.

B.
It should be a before trigger.

C.
It should be a row-level trigger.

D.
It should be a statement-level trigger.

E.
It can be a before or an after trigger.

Explanation:



Leave a Reply 29

Your email address will not be published. Required fields are marked *


Leonid

Leonid

It should be “A” and “D”, not “C” because of ORA-04091 error in row level trigger.

Vijay

Vijay

If we create a row level trigger, it will fire for every single row that is getting deleted. Instead we should create statement level trigger which will fire once the entire statement is executed.

Striker

Striker

Each new release of the Oracle database reduces the impact of the mutating table error on triggers and they are much less of a problem with Oracle9i and above. If a trigger does result in a mutating table error, the only real option is to rewrite the trigger as a statement-level trigger.

Mutating table errors only impact row level triggers. But to use a statement level trigger, some data may need to be preserved from each row, to be used by the statement level trigger. This data can be stored in a PL/SQL collection or in a temporary table. A simple row level trigger that causes a mutating table error can result in a very complicated statement level trigger to achieve the needed result.

Here are some important items to remember about triggers.

On insert triggers have no :OLD values.

On delete triggers have no :NEW values.

Triggers do not commit transactions. If a transaction is rolled back, the data changed by the trigger is also rolled back.

Commits, rollbacks and save points are not allowed in the trigger body. A commit/rollback affects the entire transaction, it is all or none.

Unhandled exceptions in the trigger will cause a rollback of the entire transaction, not just the trigger.

If more than one trigger is defined on an event, the order in which they fire is not defined. If the triggers must fire in order, you must create one trigger that executes all the actions in the required order.

A trigger can cause other events to execute triggers.
A trigger can not change a table that it has read from. This is the mutating table error issue.

The fact that a trigger can cause other triggers to fire is an important item to remember. A trigger that causes other database events to execute triggers can cause the database crash. For example, the database can capture server errors by defining a trigger on the database server error event.

But if this trigger causes a server error, the database will spin in a loop, with each firing of the trigger causing the error, firing the trigger again, and again, and again. The only way to regain control of the database is to disable the trigger.

Google

Google

The time to study or visit the content material or web sites we’ve linked to beneath.

Fenster

Fenster

below you will find the link to some internet sites that we believe you should visit

military soldier blog

military soldier blog

always a major fan of linking to bloggers that I love but really don’t get quite a bit of link like from

Convert here for free

Convert here for free

The information and facts talked about within the post are a few of the most beneficial available

make an app

make an app

here are some links to internet sites that we link to mainly because we feel they are worth visiting

Divorce Law Firm for Men

Divorce Law Firm for Men

always a significant fan of linking to bloggers that I appreciate but really don’t get a great deal of link like from

keeping your feet healthy on the battlefield

keeping your feet healthy on the battlefield

check below, are some absolutely unrelated websites to ours, nonetheless, they’re most trustworthy sources that we use

Fliesendruck

Fliesendruck

Here are a few of the web pages we suggest for our visitors

mobile app builder

mobile app builder

that will be the finish of this report. Here you will discover some internet sites that we assume you will enjoy, just click the links over

cast iran globe valve

cast iran globe valve

The info talked about inside the write-up are some of the most beneficial obtainable

apuestas deportivas por internet

apuestas deportivas por internet

always a big fan of linking to bloggers that I really like but do not get a lot of link adore from

health benefits of coconut oil

health benefits of coconut oil

just beneath, are various completely not related websites to ours, even so, they are surely really worth going over

Computer Repair Service

Computer Repair Service

check below, are some completely unrelated internet websites to ours, however, they may be most trustworthy sources that we use

image

image

Here is a superb Weblog You might Locate Intriguing that we Encourage You

silicone elastomer聽

silicone elastomer聽

The data talked about inside the report are several of the most beneficial available

プラセンタ

プラセンタ

Every the moment in a though we pick out blogs that we study. Listed beneath are the most current internet sites that we opt for

imp source

imp source

just beneath, are numerous absolutely not associated web pages to ours, on the other hand, they’re surely really worth going over

Builder

Builder

Sites of interest we have a link to

how the mind works

how the mind works

that will be the end of this post. Right here you will find some web pages that we consider youll enjoy, just click the hyperlinks over

Egyptian cotton towels

Egyptian cotton towels

we prefer to honor many other net websites on the internet, even if they arent linked to us, by linking to them. Beneath are some webpages really worth checking out

recycle

recycle

The details mentioned within the post are a number of the most effective accessible