List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 30 2000 9:16pm
Subject:RE: Is mySQL supporting sequences?..get the NextVal?
View as plain text  
At 3:14 PM +0200 2000-01-30, indrek siitan wrote:
>Hey,
>
>>  MySQL is supporting auto_increment, in relation to which you can use
>>  LAST_INSERT_ID() function to know what is the new value.
>>  It differs from sequences in the step , which is always 1.
>
>.. and don't forget to mention the other difference from a
>sequence - auto_increment doesn't insure unique ID's (the
>"famous" insert > delete last record > insert sequence)


That is incorrect.  All the values in the table are still *unique*.
That is, there are no duplicates in the table.

The values generated may not be strictly *monotonic*, but that's
a different thing.  If you're using MyISAM tables, this behavior
does not occur, values are not reused.

-- 
Paul DuBois, paul@stripped
Thread
Is mySQL supporting sequences?..get the NextVal?MICHAEL POON30 Jan
  • Re: Is mySQL supporting sequences?..get the NextVal?sinisa30 Jan
    • RE: Is mySQL supporting sequences?..get the NextVal?indrek siitan30 Jan
      • RE: Is mySQL supporting sequences?..get the NextVal?sinisa30 Jan
      • Re: Is mySQL supporting sequences?..get the NextVal?Benjamin Pflugmann30 Jan
      • RE: Is mySQL supporting sequences?..get the NextVal?Paul DuBois31 Jan