query, table

When I run the query:

SELECT LAST_INSERT_ID() as id FROM myTable;

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

for example.
if there are 5 total records in the table. and the last inserted Id is 9, if
I run the above query I get:

+------+
|    id     |
+------+
|    9      |
|    9      |
|    9      |
|    9      |
|    9      |
+------+



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