MySQL Forums
Forum List  »  Newbie

Re: Batch statements
Posted by: David Fells
Date: March 24, 2005 08:32AM

You could do:

SELECT "Now executing first insert..." ;

And if you have an auto increment column..

SET @controlID = LAST_INSERT_ID();
SELECT "Now executing first insert..." ;
INSERT INTO test VALUES (1, "blah blah", 35);
SELECT IF (@controlID = LAST_INSERT_ID(), 'Insert failed on query: INSERT INTO test VALUES (1, "blah blah", 35);', 'Query OK');

etc...

Options: ReplyQuote


Subject
Written By
Posted
March 23, 2005 11:24PM
Re: Batch statements
March 24, 2005 08:32AM
March 24, 2005 08:33AM
March 24, 2005 11:11AM


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.