List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 13 1999 7:10pm
Subject:Re: help with tracking No.
View as plain text  
At 12:00 PM -0700 8/13/99, Z Mehta wrote:
> Does anyone know a good way to attach a tracking No. with each
>submission into my database.  This number would be the primary key.  I
>would consider using;
>Int auto_increment,
>if I could start counting from 1500.

Prior to MySQL 3.23:
Create your table, insert a fake record with an explicit number of 1499,
then start inserting your own records.  After you have some real records
in the table, delete the record with 1499 as the key.

In MySQL 3.23, you can set the value you want the sequence to start with:

create table t
(i int not null auto_increment primary key)
auto_increment = 1500;

insert t values(NULL);

select * from t;
| i    |
| 1500 |

Paul DuBois, paul@stripped
help with tracking No.Z Mehta13 Aug
  • Re: help with tracking No.Nem W Schlecht13 Aug
  • Re: help with tracking No.Paul DuBois13 Aug