It is currently Wed Feb 08, 2012 6:00 pm

All times are UTC + 2 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: trigger help in mysql
PostPosted: Mon Feb 11, 2008 3:10 am 
Offline

Joined: Sat Feb 18, 2006 1:59 am
Posts: 20
is this how you write the update trigger so the table automatically updates
Code:
create trigger updater
begin
update items,sales
set items.number_on_hand = items.number_on_hand - sales.number_sold
where Item_id = sales.Sales_id;
end


note: there are 2 tables


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 2 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron