Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003

    Question Unanswered: How do I set up Autonum?

    Persently I am trying to create a table with a field in it that automatically increment, A autoNum field.

    Is this possible in MySql if so could someone point me in the correct drection,

    Thanks Nixies

  2. #2
    Join Date
    Mar 2004
    use auto_increment.

    If you want to use a higher value than 1 for your auto_increment value then either set up the table with it or use alter table to change it.

    It needs to be a myisam table and not innodb table though.

    create table testing(
    id int primary key auto_increment,
    firstname char(12),
    lastname char(12)
    ) type=myisam
    auto_increment = 34533
    and that value is the first one that will start in your id table.
    Last edited by guelphdad; 04-30-04 at 15:17.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts