Thread: Simple Trigger Question..
05-03-11, 10:32 #1Registered User
- Join Date
- May 2011
Unanswered: Simple Trigger Question..
Can somebody please tell me how to do something?
I want to create a trigger that is run every time a record is inserted into a particular table. This is easy.
What I want is to fire the trigger from an insert on 1 table and do somthing on another.
so In my case i have
create or replace trigger decrement_available after insert on BOOKING begin SOME CODE HERE :-( end;
so I guess so basic pseudo code would be such
before (or after) insert record on BOOKING table
Find record of the foreign key in the TOY table
Modify a field in that record to subtract it by one.
I know this should be so simple but I cant find ANY good material in books or internet with syntax etc for triggers. Lots of info on how they work etc.. :-( :-(
05-03-11, 10:44 #2Registered User
Provided Answers: 1You can lead some folks to knowledge, but you can not make them think.
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.