#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    82
    Rep Power
    10

    Primary key auto increment


    I have a table called 'users' where there is a 'USRID' column that has been set as the primary key and is alphanumeric. We're working on another project and also need to have an auto increment numeric value unique to each record. I'm using navicat and when i try to add in the auto increment field and make a second key, each value of that field is 1, it doesn't increment. Any thoughts on how I could accomplish this?

    thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Mar 2008
    Posts
    1,927
    Rep Power
    378
    1. Use USRID instead
    or
    2. Make USRID UNIQUE instead of PRIMARY and use the auto_inc as the PRIMARY.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    82
    Rep Power
    10
    thanks, i wasn't aware of the unique option.

IMN logo majestic logo threadwatch logo seochat tools logo