hi all
i m tryin to get last_id from an insert statement in JRDC2
can i use this mysql function :
LAST_INSERT_ID()
as batch commands ?
is this possible / reliable ?
is there a better way ? other than this http://stackoverflow.com/questions/13151861/fetch-last-inserted-id-form-stored-procedure-in-mysql
which i dont really understand
i m tryin to get last_id from an insert statement in JRDC2
can i use this mysql function :
LAST_INSERT_ID()
INSERT INTO foo (auto,text)
VALUES(NULL,'text'); # generate ID by inserting NULL
INSERT INTO foo2 (id,text)
VALUES(LAST_INSERT_ID(),'text'); # use ID in second table
as batch commands ?
is this possible / reliable ?
is there a better way ? other than this http://stackoverflow.com/questions/13151861/fetch-last-inserted-id-form-stored-procedure-in-mysql
which i dont really understand