Re: MySQL Tutorial: LAST_INSERT_ID()
How I can Insert tow table data?
This are tables
Products
Products_description
I am not good in stored procedure. I wrote following code, but it did not work.
Can any body help me?
DELIMITER $$
DROP PROCEDURE IF EXISTS `esale`.`PRODUCTSs` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `PRODUCTSs`()
BEGIN
insert into products(products_id,products_price)
values(NULL,200);
commit;
insert into products_description(products_id,products_name)
values(LAST_INSERT_ID(),'Paper');
commit;
END $$
Thanks,
DELIMITER ;
Subject
Views
Written By
Posted
66137
September 14, 2004 07:43AM
23869
October 18, 2004 08:50AM
18030
December 16, 2004 12:15AM
Re: MySQL Tutorial: LAST_INSERT_ID()
14361
March 08, 2007 10:14PM
15896
October 18, 2004 08:07PM
9035
March 14, 2007 04:45AM
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.