At 12:06 PM -0400 10/27/99, Peter Bojkov wrote:
>I have a table with approx. 10 mln. rows. I am trying to do a
>"select last_insert_id() from table" and mysql returns me 10 mln.
>rows filled with zeroes. Is that a normal behavior? There isn't much
>info about that function in the mysql manual, neither in the O'Reilly's
>book about mysql&msql.
Since you have specified no WHERE clause in your query, MySQL will return
a result set with one row per row in your table. The value of last_insert_id()
will be 0 if you have not inserted a record into a table with an AUTO_INCREMENT
column at some point in the same server session.
What exactly are you trying to do?
Paul DuBois, paul@stripped