MySQL Forums
Forum List  »  Triggers

Re: begin .. for each row in other table{ } ... end
Posted by: davy timmermans
Date: April 01, 2006 10:20AM

ok, i'll take a look at it ;)

I''ll have to take a look to the meaning of for each row

at least thank you for taking your time. I'll tell you if it worked

I never worked with this kind of insert statement but


INSERT
INTO medewerkerUsers
select s.sid from salesman s,new.cid , 'I';
END

because there is no relation between the tree.
I'm composing a new table with every salesman as input, the inserted new.cid and the value 'I'

I'm looking thus for something
INSERT
INTO medewerkerUsers values(select s.sid from salesman s,new.cid , 'I');

1)is there a query who do this?

2)and the for each statement:
means it that if there is an select stament between begin ... end
it will do for each row of this statement, for whatever table the select statement is


?



Edited 3 time(s). Last edit at 04/01/2006 10:45AM by davy timmermans.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: begin .. for each row in other table{ } ... end
2327
April 01, 2006 10:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.