Home » Developer & Programmer » Forms » id problem
id problem [message #79102] Wed, 24 April 2002 08:48 Go to next message
massa
Messages: 12
Registered: April 2002
Junior Member
I have a table which contain a column - named 'id' - and I would like to know which sort of type should I give to this colunm because I would like this column to auto upgrade each time I insert a new row like this :
id name password
1 John Jo1254
2 Ralf Ra6871
3 Chris Ch9874

For example, if a new person wants to have a password, this person has only have to give his name and his password and it will add a new line with id=4.

If somebody has an idea, please suggest.
Christophe
Re: id problem [message #79113 is a reply to message #79102] Fri, 26 April 2002 16:53 Go to previous message
Jr.Z
Messages: 1
Registered: April 2002
Junior Member
Try create a sequence in SQL plus:
Create sequence CustomerID increment by 1 start with 1000;
NB: '1000' -whatever number you like.
While you insert a new row:
Insert into TableName(ID,NAME,PASSWORD) VALUES (CustomerID.NEXTVAL,'PERSON','PASSWORD');
Previous Topic: Re: Which front-end is faster Dev 2000 or Visual Basic or Power Builder
Next Topic: Connecting Developer/2000 v2.1 to Oracle8.0.4 (Personal)
Goto Forum:
  


Current Time: Fri Apr 26 15:33:40 CDT 2024