List:General Discussion« Previous MessageNext Message »
From:Scott Purcell Date:January 13 2005 6:05pm
Subject:RE: create sequence
View as plain text  
I understand the auto-increment capability, but how would one share it amount three
different tables?

Would one have to do a rig, and create an extra table with increment in it, then get that
value to update table 1, then repeat process again to get new increment and put it into
table 2, etc.?

I am used to asking for the sequence.nextId, then using it in any table I need.

Am I missing something here, or does someone know how to handle this in multiple tables?

Scott



-----Original Message-----
From: Peter Brawley [mailto:peter.brawley@stripped]
Sent: Thursday, January 13, 2005 11:38 AM
To: Scott Purcell
Cc: mysql@stripped
Subject: Re: create sequence


You want AUTO_INCREMENT, 
http://dev.mysql.com/doc/mysql/en/example-AUTO_INCREMENT.html.

PB

-----

Scott Purcell wrote:

>Hello,
> 
>I would like to create a sequence object in mysql that I could use in multiple tables
> through a application I am developing.
> 
>Could someone please send my the syntax of how to create a simple sequence that starts
> at 1 increments by 1. 
>
>thanks,
>
> 
>
>  
>

Thread
create sequenceScott Purcell13 Jan
  • Re: create sequencePeter Brawley13 Jan
  • Re: create sequenceJochem van Dieten13 Jan
RE: create sequenceJay Blanchard13 Jan
RE: create sequenceScott Purcell13 Jan
  • RE: create sequenceSGreen13 Jan
  • RE: create sequenceFrank Bax13 Jan