Hi,
I dont know whats wrong with my mysql but when I add a column with auto_inc
(I just copied and paseted what you did) I got: Primary key cannot be NULL,
so, but I got it working So thanks anyway.
And as I always say... If something works, dont touch int.
So I wont reinstall.....
/roger
> mysql> select * from tbl;
> +-----+-------+
> | oid | name |
> +-----+-------+
> | 1 | bob |
> | 2 | vera |
> | 3 | steve |
> | 4 | Mike |
> +-----+-------+
> 4 rows in set (0.62 sec)
>
> mysql> alter table tbl drop primary key,drop oid;
> Query OK, 4 rows affected (6.39 sec)
> Records: 4 Duplicates: 0 Warnings: 0
>
> mysql> alter table tbl add id int not null auto_increment primary key
first;
> Query OK, 4 rows affected (3.06 sec)
> Records: 4 Duplicates: 0 Warnings: 0
>
> mysql> select * from tbl;
> +----+-------+
> | id | name |
> +----+-------+
> | 5 | bob |
> | 6 | vera |
> | 7 | steve |
> | 8 | Mike |
> +----+-------+
> 4 rows in set (0.39 sec)
>
> mysql> alter table tbl drop primary key,drop id,
> -> add nid int auto_increment not null primary key first;
> Query OK, 4 rows affected (3.87 sec)
> Records: 4 Duplicates: 0 Warnings: 0
>
> mysql> select * from tbl;
> +-----+-------+
> | nid | name |
> +-----+-------+
> | 9 | bob |
> | 10 | vera |
> | 11 | steve |
> | 12 | Mike |
> +-----+-------+
> 4 rows in set (0.35 sec)
>
> mysql> select version();
> +-----------+
> | version() |
> +-----------+
> | 3.23.33 |
> +-----------+
> 1 row in set (0.09 sec)
>
>
> --
> Don Read [EMAIL PROTECTED]
> -- If you are going to sin, sin against God, not the bureaucracy.
> God will forgive you but the bureaucrats won't.
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php