Nathan:

I suspect you are trying to solve the wrong problem.  Why don't you tell us 
_why_ you think you need this value, what you are trying to accomplish.

At 04:23 PM 1/29/2002 -0700, Nathan wrote:
>But if this is the MyISAM table type, and you performed an insert, then a 
>delete, your MAX + 1 would
>get the next value of the series, but the auto_increment will actually use 
>MAX + 2. Correct? Is
>there a system call to find out what MySQL will use next rather than the 
>highest + 1?
>
># Nathan
>
>----- Original Message -----
>From: "James Montebello" <[EMAIL PROTECTED]>
>To: "Joel Wickard" <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Tuesday, January 29, 2002 4:16 PM
>Subject: Re: next insert id
>
>
>
>SELECT MAX(id) FROM table;
>
>will get you the highest value for 'id', that +1 will be the 'next' value,
>until someone inserts a new row into that table.
>
>james montebello
>
>On Tue, 29 Jan 2002, Joel Wickard wrote:
>
> > database,sql,query,table
> >
> >
> > I need to find out what the next value will be in an auto_increment field
> > will be. could someone help me out with the select statement?
> >
> >
> > ---------------------------------------------------------------------
> > Before posting, please check:
> >    http://www.mysql.com/manual.php   (the manual)
> >    http://lists.mysql.com/           (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> >
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to