Jump to content

Recommended Posts

Hi, I"m trying to create a simple online buying site and I have a unique ID as well as a unique IMEI (it is the identification number used on cellular phones) that I want also to be unique but I want to choose the starting value to be some big number like 1000000000000000 (16 digit value), I think this is a simple question, I'm using phpmyadmin if that helps btw.  :rtfm:

I was trying to go for more authenticity since actual cellular phones have this IMEI (ID number) being that long, but I can go shorter if  that's the case, just let me know how, thanks.

The number is depends on what YOU want.  What is this for?  If this is just a unique identifier then use an auto-incremented field and start at 1.

So not possible to have this auto incrementing digit start at a number I want?

It is possible.  Read the manual - http://dev.mysql.com/doc/refman/5.0/en/example-auto-increment.html

 

To start with an AUTO_INCREMENT value other than 1, you can set that value with CREATE TABLE or ALTER TABLE, like this:

 

mysql> ALTER TABLE tbl AUTO_INCREMENT = 100;

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.