MySQL Forums
Forum List  »  Triggers

Re: Creating a trigger to search in another table...
Posted by: Rene van Geijn
Date: March 02, 2006 02:40AM

Sorry

CREATE TRIGGER trg_DATATABLE
BEFORE INSERT ON DATATABLE
FOR EACH ROW
BEGIN
DECLARE i VARCHAR(32);

SELECT Title
INTO i
FROM GRIDTABLE
WHERE V1Low <= NEW.V1
AND V1High > NEW.V1
AND V2Low <= NEW.V2
AND V2High > NEW.V2;

SET NEW.Title = i;
END;
$$

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Creating a trigger to search in another table...
2043
March 02, 2006 02: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.