This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Me And My Respected Teacher Mr Kamal Sheel Mishra

Mr. K.S. Mishra is HOD of Computer Science from SMS Varanasi where I have completed my MCA

Me And My Respected Teacher Mr Udayan Maiti

Mr. Udayan Maiti is a senior .Net Expert and has guided many professionals of multi national Companies(MNC)

Me And My Best Friend Mr Ravinder Goel

Mr. Ravinder Goel is a senior Software Engineer and now he is working Wipro Technology

Tuesday 8 November 2011

Trigger in Orcale Database


What is Trigger in Orcale Database



Oracle allows you to define procedures that are implicitly executed when an DML statement  (insert ,update,delete) is issued against the associated table. These procedures are called database triggers.

 database trigger is procedural code that is automatically executed in response to certain events on a particular table or view in a database.

For example-

create a table marks 

create table marks(rollno int primary key, name varchar(20), phy int, chem int, math int);

again another  create table  which name is backupmarks

create table backupmarks (rollno int primary key, name varchar(20), phy int, chem int, math int);

create trigger

create trigger backuptrigger
after insert on marks for each row
begin
insert into backupmarks values(:new.rollno,:new.name,:new.phy,:new.chem,:new.math);
end;

after creating trigger you  insert  data  in table marks

insert into marks values(1,'arvind',78,67,89);

 Data is  inserting only marks table but you can see automatically executed in response to certain events on a particular  table backupmarks.                                                       
you can cheack  results

select*from marks;

select*from backupmarks;

after running this  query  you got same resuls  This  is Trigger  Concepts