List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:April 7 1999 1:26am
Subject:how to start counting at a specific number?
View as plain text  
For reasons beyond my logical comprehension, my extremely irritating and
stubborn boss wishes a database index to start at the number "142857" and keep
incrementing from there... I would love for that to be the Primary Key as
well... Aside from loading 142856 bogus entries into the database before it so
that the next one will start from there, is there a better way to tell mySQL to
start a field at a specific number and increment up from there?

CREATE TABLE User_Table (
  user_id INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,    # I wish for this to
start counting at 142857
  date TIMESTAMP(8),

  first_name VARCHAR(15) NOT NULL,
  last_name VARCHAR(15) NOT NULL.

  INDEX (date),
  INDEX (last_name)
);

Also, while I'm thinking of it, do I need to add INDEX(user_id) or is that
redundant since it is the PRIMARY KEY?

ÐÆ5IÐ         What is http://TheMatrix.com


Thread
how to start counting at a specific number?Daevid Vincent7 Apr
  • Re: how to start counting at a specific number?Thimble Smith7 Apr
  • Re: how to start counting at a specific number?Shaun Batterton8 Apr
    • Re: how to start counting at a specific number?Vivek Khera8 Apr
  • Re: how to start counting at a specific number?Shaun Batterton8 Apr
    • Re: how to start counting at a specific number?Thimble Smith8 Apr