What is TRIGGER in DB2?

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Prakash Jha
Registered Member
Posts: 64
Joined: Sat Jun 29, 2013 1:45 pm

What is TRIGGER in DB2?

Post by Prakash Jha »

Hi,

I'm not sure what is a trigger in DB2 and where it is used?
User avatar
Anuj Dhawan
Founder
Posts: 2838
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:

Re: What is TRIGGER in DB2?

Post by Anuj Dhawan »

A trigger is a set of instructions that are executed after a DB2 action, such as INSERT, UPDATE or DELETE, on a particular table. You would use the CREATE TRIGGER statement to build your trigger for a particular table.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Adyanath Ghosh
New Member
Posts: 1
Joined: Thu Aug 22, 2013 3:59 pm

Re: What is TRIGGER in DB2?

Post by Adyanath Ghosh »

Trigger is a PL/SQL block that is executed on an event in the database. The event is related to a particular data manipulation of a table such as inserting, deleting or updating a row of a table or invoking a UDF ( User define function in DB2 )

Sometimes to keep a track of the changes in a table or to perform an automatical action or to perform an action depending on another action ( Dependency ) DB2 Developer use triggers.

Thanks,
Adyanath Ghosh
You do not have the required permissions to view the files attached to this post.
Prakash Jha
Registered Member
Posts: 64
Joined: Sat Jun 29, 2013 1:45 pm

Re: What is TRIGGER in DB2?

Post by Prakash Jha »

Thank you Anuj.

Thanks Adyanath - but your pdf directs to an Oracle document?
utkarsh
Registered Member
Posts: 79
Joined: Fri Jun 21, 2013 10:32 pm

Re: What is TRIGGER in DB2?

Post by utkarsh »

Prakash Jha wrote:Thanks Adyanath - but your pdf directs to an Oracle document?
Though the database is different but I think the concept is same...
Post Reply Previous topicNext topic

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”