i want to chamge a column that is defined as :
order_id int(8) unsinged notnull
and tried to do :
alter TABLE tblprodoreder add PRIMARY KEY (order_id)
but i get "duplicate entry '0' for key 1"
what to do?
and how do i define it as autoincementae too?
thnaks i nadvance
peleg
creating a key in a table
Moderator: General Moderators
- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
the problem is that i have
already defined :
order_id int(8) default 0
and beaucse of that all the rws are 0 now
and maybe beacuse of that i cant do a key!
how can i fizx it?
order_id int(8) default 0
and beaucse of that all the rws are 0 now
and maybe beacuse of that i cant do a key!
how can i fizx it?
- pelegk2
- Forum Regular
- Posts: 633
- Joined: Thu Nov 27, 2003 5:02 am
- Location: Israel - the best place to live in after heaven
- Contact:
how can i fix them?
to write a script that will un all over the rows and change the valued to a running numbers?