Hello,
We are using mysql 2.22.32 (yes antique, but ISPs)
I need an sequence table.
Every time a client reads, the value shall be incremented.
A single row, integer value would be an ideal sequencen I think.
CREATE TABLE sequence(
id int4;
);
now, is this the correct way to emulate a sequence in mysql?
LOCK TABLES sequence WRITE;
UPDATE sequence SET id=id+1;
SELECT id FROM sequence;
UNLOCK TABLES;
This seems a bit clumsy to me.
I already checked the manual but found no recommendat example.
Thanks for any help
Gunnar von Boehn
---------------------------------------------------------------------
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