MySQL Forums
Forum List  »  Triggers

Error 1064 when creating trigger, check so many times. help
Posted by: James ZHAN
Date: December 05, 2011 10:40AM

CREATE TRIGGER pushdb after INSERT ON job
FOR EACH ROW BEGIN

DECLARE done INT DEFAULT FALSE;
DECLARE temp1 VARCHAR(20);


DECLARE cursor1 CURSOR FOR select sid from student where gpa>3.5 and match(resume) against('database systems');


DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;

OPEN cursor1;

read_loop: LOOP

FETCH cursor1 into temp1;

if doen THEN

LEAVE read_loop;
end if;

insert into push values(temp1, new.cid, new.bname, new.jid, timestamp);

end loop;

close cursor1;
end

Options: ReplyQuote


Subject
Views
Written By
Posted
Error 1064 when creating trigger, check so many times. help
1773
December 05, 2011 10:40AM


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.