what are Triggers?

Answer Posted / suresh

SQL> CREATE TABLE to_table
2 (col1 NUMBER);

Table created.

SQL> CREATE OR REPLACE TRIGGER statement_trigger
2 AFTER INSERT ON to_table
3 BEGIN
4 DBMS_OUTPUT.PUT_LINE('After Insert Statement
Level');
5 END;
6 /

Trigger created.

SQL> CREATE OR REPLACE TRIGGER row_trigger
2 AFTER INSERT ON to_table
3 FOR EACH ROW
4 BEGIN
5 DBMS_OUTPUT.PUT_LINE('After Insert Row Level');
6 END;
7 /

Trigger created.


SQL> INSERT INTO TO_TABLE VALUES(1);
After Insert Row Level
After Insert Statement Level

1 row created.


SQL> BEGIN
2 INSERT INTO TO_TABLE VALUES(2);
3 INSERT INTO TO_TABLE VALUES(3);
4 INSERT INTO TO_TABLE VALUES(4);
5 INSERT INTO TO_TABLE VALUES(5);
6 INSERT INTO TO_TABLE VALUES(6);
7 INSERT INTO TO_TABLE VALUES(7);
8 INSERT INTO TO_TABLE VALUES(8);
9 INSERT INTO TO_TABLE VALUES(9);
10 INSERT INTO TO_TABLE VALUES(0);
11 END;
12 /

WAT LL BE THE O/P???

XPLAIN IT>>>>

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain index?

749


How to load data from external tables to regular tables?

541


How to start your 10g xe server?

596


What is Java Pool in Oracle?

604


What are the benefits of ordbms?

619






how to code performance tuning of oracle PL/SQL? can any body send me the perfect answer?

4669


How to filter out duplications in the returning rows using oracle?

642


How to create id with auto_increment on oracle?

547


Please send me Informatica 8.1 certification dumps, my mail id mona85gupta@gmail.com

1442


How to delete a user account in oracle?

551


6. Display the client name and order date for all orders using the traditional method.

1751


How to retrieve data from an explicit cursor?

559


What is literal?

589


How to write date and time interval literals in oracle?

575


Hi this srilatha. I comlpeted my Oracle-hrms. can u provide me interview questions on Core hr, payroll,sshr,OLM etc..

1656