At 17:03 -0800 1/29/02, 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?

You can't find out what it *will be* until you actually create the record.
Then you get the like this:

SELECT LAST_INSERT_ID();

Check the discussion for LAST_INSERT_ID() in the MySQL manual.

It will tell you the answer to your next question. :-)


---------------------------------------------------------------------
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