Re: sequential id

2005-12-16 Thread Joseph Alotta
Greetings, Thank you Dahl and Xiaobo. Here it is working for all to see. I particularly like that it doesn't try to use a key again once it is deleted. Joe. mysql> use names; Database changed mysql> create table people ( id mediumint unsigned not null auto_increment, -> first

Re: sequential id

2005-12-15 Thread Xiaobo Chen
Oops, forgot ',' at the end of the 3rd line. > Try this: > > CREATE TABLE tablename ( > `id` mediumint(9) NOT NULL auto_increment, > `name` varchar(50) NOT NULL default '' > PRIMARY KEY (`id`) > ) ENGINE=InnoDB DEFAULT CHARSET=latin1; > >> Greetings, >> >> I have a bunch of names and addres

Re: sequential id

2005-12-15 Thread Xiaobo Chen
Try this: CREATE TABLE tablename ( `id` mediumint(9) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '' PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; > Greetings, > > I have a bunch of names and addresses that I am adding to MySql > database. I would like to auto

Re: sequential id

2005-12-15 Thread Xiaobo Chen
Try this: CREATE TABLE tablename ( `id` mediumint(9) NOT NULL auto_increment, `name` varchar(50) NOT NULL default '' PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; > Greetings, > > I have a bunch of names and addresses that I am adding to MySql > database. I would like to auto

Re: sequential id

2005-12-15 Thread Jørn Dahl-Stamnes
On Wednesday 14 December 2005 16:31, Joseph Alotta wrote: > Greetings, > > I have a bunch of names and addresses that I am adding to MySql > database. I would like to automatically assign a unique sequence > number to each person. Is there a way to do this easily? > > idname > 1 bob jones

sequential id

2005-12-15 Thread Joseph Alotta
Greetings, I have a bunch of names and addresses that I am adding to MySql database. I would like to automatically assign a unique sequence number to each person. Is there a way to do this easily? idname 1 bob jones 2 larry smith 3 henry rogers Thanks for you help, Jo