On Tuesday 23 April 2002 1:10 pm, destr0 wrote:
> query, table
>
> When I run the query:
>
> SELECT LAST_INSERT_ID() as id FROM myTable;

This query really makes no sense.  It is almost the same as:

SELECT LAST_INSERT_ID() as id;

> It returns the last inserted Id, but why does it return that value for
> every row in the table.

What would you expect it to do?  This is working exactly as I would expect.

_Perhaps_ you mean:

SELECT id FROM myTable WHERE id = LAST_INSERT_ID();

but I am not entirely sure.

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