Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How to call a stored function with parameters?

1032


What is the usage of analyze command in oracle?

1089


What do you understand by a database object? Can you list a few of them?

1014


How to create a table interactively?

1082


Where is the export dump file located?

1137


why dont we assign not null constraint as table level constraint.

2733


I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.

2305


HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE

2230


Where are the settings stored for each instance in oracle?

1101


Explain the use of grant option in imp command.

1020


How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?

2825


How to create a single index for multiple columns?

1031


What are the different types of database objects?

1056


How to execute a stored procedure in oracle?

1078


Explain what are the characteristics of data files?

1082