470,613 Members | 2,470 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,613 developers. It's quick & easy.

0 as a primary key value

This is a newbie question, but why can't I have an index value of 0 in my
primary key column?

I want agentid to be 0 for the record "UNASSIGNED," but every time I update
the table it gets set to the next autoincrement value.

This is my primary key:
agentid int(11) unsigned PRI NULL auto_increment

I could rewrite my scripts to not use the 0 value from the database, but
that would take some time. Any ideas?

Jul 19 '05 #1
0 1628

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Andrew Grandison | last post: by
reply views Thread by sfh | last post: by
1 post views Thread by sfh | last post: by
3 posts views Thread by Leon Shaw | last post: by
6 posts views Thread by Irfan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.