From: Date: January 18 2005 1:06am Subject: Rollback and INSERT_ID() or LAST_INSERT_ID() List-Archive: http://lists.mysql.com/mysql/178600 Message-Id: <20050118000646.RHGS1621.simmts7-srv.bellnexxia.net@mineirinho> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi List, I have a field in one of my tables that uses auto-increment from MySQL 4.1.8-nt (Windows XP). My problem is to get the last insert ID when the insert fails and I use rollback. The MySQL is still incrementing the field. How can I avoid this if it is possible? I am trying to avoid to use the function MAX() to get the last ID inserted. Thanks for any help. Andre -- Andre Matos amatos@stripped