Re: Confused on Triggers and Store Procedures
To get the last auto_increment value used, call last_insert_id().
You can't call UPDATE on `pen` in a Trigger on pen.
And isn't there a typo: aren't you trying to set location_id? So ...
set new.location_id = last_insert_id();
Subject
Views
Written By
Posted
2397
January 01, 2016 09:19PM
1145
January 01, 2016 10:41PM
Re: Confused on Triggers and Store Procedures
1145
January 02, 2016 12:19AM
1032
January 02, 2016 10: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.