main logo
Subject: Re: [NF] What's the equivalent of VFP's NEWID() function in MySQL?
Author: "Andy Davies"
Posted: 2003/06/13 03:33:00
 
View Entire Thread
New Search


On Thu, 12 Jun 2003 17:18:55 -0700, Paul McNett
> lock tables <database>.<table> write
> select max(iordnum) as iordnum from <database>.<table>
> insert into <database>.<table> (iordnum) values (iordnum + 1)
> unlock tables

I wouldn't think that would scale *at all* - is there no way to lock rows?
(Oracle provides 'sequences' for this because even row locking was
considered to be too inefficient!).

AndyD 8-)#








 
©2003 Andy Davies
<-- Prior Message New Search Next Message -->