MySQL Forums
Forum List  »  Triggers

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

Something Like:

CREATE TRIGGER trg_DATATABLE
BEFORE INSERT ON DATATABLE
FOR EACH ROW
BEGIN

SELECT x
INTO NEW.x
FROM GRIDTABLE
WHERE low >= NEW.low
AND high <= NEW.high
LIMIT 1;

END;

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Creating a trigger to search in another table...
1957
March 01, 2006 01:59AM


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.