Link to home
Start Free TrialLog in
Avatar of brgdotnet
brgdotnetFlag for United States of America

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
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of brgdotnet

ASKER

Sounds awesome! Thanks. I won't be able to try it until tomorrow. Thanks.
Thanks !!!