brgdotnet
asked on
How to update a column with increment in Oracle
Suppose I have a table with two columns named ID, and UserName. When the table is first created ID will have all zeroes in it.
Example:
0 Barry
0 Mary
0 Jane
0 Dan
How would I update this table so that is would add 1 to each value in the ID column starting from the first record in the table. So the end result would look like below.
1 Barry
2 Mary
3 Jane
4 Dan
Example:
0 Barry
0 Mary
0 Jane
0 Dan
How would I update this table so that is would add 1 to each value in the ID column starting from the first record in the table. So the end result would look like below.
1 Barry
2 Mary
3 Jane
4 Dan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks !!!
ASKER