Mysql - add new column with values to a table ??

Discussion in 'MySQL' started by adam1987, Apr 17, 2010.

  1. #1
    I am using social engine and i have messed up the user_id numbers in the database, i have a backup of the user id numbers in correct order, however i am having difficulty importing the list of correct user id numbers to the user table..

    I created a new column called user_newid

    and i have tried to run the SQL as below, without any luck, i keep getting the error. #1062 - Duplicate entry '2' for key 1

    INSERT INTO `se_users` (`user_newid`) VALUES

    (5),
    (8),
    (23),
    (75),
    (34),
    (6),
    (7),
    (123),
    (9),
    (10),
    (11),
    (32),
    (63),
    (84),
    (95);

    Any help appreciated.
     
    adam1987, Apr 17, 2010 IP