last_insert_id()

-----

neal wrote:

> I have a table that will auto increment it's PK field upon adding a new
> record.  I would like obtain that auto-increment value immedicately after
> the add of that record so that I may reference it within another table ...
> sort of an informal PK/FK relationship.
>
> In SQLServer I believe I recall there was a function something like @@ID to
> retrieve this value ... could be written directly into your SQL.
>
> What sort of function exists in mySQL for this purpose?
>
> Thanks.
> NEal
>
> ---------------------------------------------------------------------
> 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