add unique ID for each record the quick way

Discussion in 'MySQL' started by TriG0rZ, Nov 13, 2008.

  1. TriG0rZ

    TriG0rZ New Member

    Joined:
    Oct 2, 2008
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    UK
    Ok i have a database with records and i have to add a unique ID for each database i can take the long way and do update .... set ...=1 and so on, BUT is their a faster way of doing it so, like i do a sql statment and it does it for all records??

    Thank you very much.
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Add a unique auto increment field
     
  3. TriG0rZ

    TriG0rZ New Member

    Joined:
    Oct 2, 2008
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    UK
    awesome that has given me the step i needed thank you very much :D!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice