| auto increment [message #564050] |
Tue, 21 August 2012 01:58  |
 |
vaibhav15211
Messages: 13 Registered: August 2012 Location: Hyderabad
|
Junior Member |
|
|
I have a table named student_details with columns "NAME","ADDRESS","COURSE" with several rows of data all ready inserted
I have to add one more column "ID" which increments automatically.
I tried to do this using SEQUENCE but no values got inserted for already existing rows in "ID".
Please suggest how to write a script that automatically increments and inserts values for already existing rows also.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Re: auto increment [message #564084 is a reply to message #564083] |
Tue, 21 August 2012 06:10   |
 |
Michel Cadot
Messages: 54205 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Yes, the key work is "which increments automatically" and the title also said it.
Follow the link I posted, this is a FAQ.
Or OP poorly described his issue and used not appropriate words (as they are defined in all the dbms that support autoincrement column).
Regards
Michel
[Updated on: Tue, 21 August 2012 06:12] Report message to a moderator
|
|
|
|
|
|
| Re: auto increment [message #564112 is a reply to message #564085] |
Tue, 21 August 2012 08:04  |
 |
Michel Cadot
Messages: 54205 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Sorry, I apologize to have hurted you, it was not my intention.
I'd better say it in another way as OP's question is unclear.
Regards
Michel
|
|
|
|