Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to add an incremental counter in sql ?

444596Jul 6 2007 — edited Jul 6 2007
I just want to add an incremental counter with my sql statement.

for example.

I have a table student with three fields ID & NAME

data is as

ID Name
10 ABC
20 XYZ
30 OPQ

then i want to generate a SQL statement that yield me a output as :

Counter ID Name
1 10 ABC
2 20 XYZ
3 30 OPQ

Anyone can help ?

Capri !!!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 3 2007
Added on Jul 6 2007
11 comments
2,189 views