>Does anybody know if there is a function to retrieve the next unique ID
>number for a record to be made in the future?
I believe you can reliably allocate sequence numbers from a "sequence
table" (a table used only to dole out sequence numbers) like this:
create table sequence ( seq int not nul
W.,
Monday, July 01, 2002, 5:29:41 PM, you wrote:
WE> Does anybody know if there is a function to retrieve the next unique ID
WE> number for a record to be made in the future?
Nope.
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by En
On Monday 01 July 2002 10:29, W. Enserink wrote:
> Hi all,
You would just do something like
SELECT max(idcolumn)+1 as nextvalue FROM tablename
where idcolumn is the name of the column and tablename is the name of your
table, but remember that you may need to serialize this, since probably the
Try this query:
SELECT
yourcolumn+1
FROM yourtable
ORDER BY id desc
LIMIT 1;
greetings,
richard
-
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (t