I made a typo in my previous message. >-----Original Message----- >From: Jerry Schwartz [mailto:je...@gii.co.jp] >Sent: Friday, January 21, 2011 12:20 PM >To: 'Jerry Schwartz'; 'Michael Dykman'; 'MySql' >Subject: RE: CURRENT insert ID > >>-----Original Message----- >>From: Jerry Schwartz [mailto:je...@gii.co.jp] >>Sent: Friday, January 21, 2011 11:56 AM >>To: 'Michael Dykman'; 'MySql' >>Subject: RE: CURRENT insert ID >> >>>-----Original Message----- >>>From: Michael Dykman [mailto:mdyk...@gmail.com] >>>Sent: Friday, January 21, 2011 11:50 AM >>>To: MySql >>>Subject: Re: CURRENT insert ID >>> >>>I think an ON INSERT TRIGGER would take care of this; can't think of >>>any other way. Using last_insert_id() in the argument list would >>>likely yield you the previous value (which might not even related to >>>your table. >>> >[JS] Alas, you cannot update a record in a trigger if the record is in the >same table as the trigger. > > >CREATE TRIGGER xx AFTER UPDATE ON t >FOR EACH ROW > UPDATE t SET f1 = 7; > > [JS] That should have read "AFTER INSERT"; but it's still illegal.
Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 E-mail: je...@gii.co.jp Web site: www.the-infoshop.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org