Re: Stored Proceedure Not doing anything...?
-- set _new_product_id2 = (SELECT MAX(`ProductID`) FROM `products`)+1;
Is it auto_increment? Then leave it out of the column Insert list, let MySQL handle it.
> SET _new_product_id = (SELECT MAX(`ProductID`) FROM `products`);
Wrong, use Last_Insert_Id().
Still no error handling.
Subject
Views
Written By
Posted
989
June 02, 2018 07:04AM
552
June 02, 2018 07:24AM
608
June 02, 2018 11:27AM
670
June 02, 2018 12:33PM
Re: Stored Proceedure Not doing anything...?
503
June 02, 2018 02:44PM
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.