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!

Generating same sequence number for group of rows

user10932986Oct 13 2016 — edited Oct 13 2016

Hi All,

Is there a way to create one sequence number for a group of rows with some unique value. For example, if I have a table with a column as below.

Column1
34567
34567
34567
12345
12345
12345
12345
12345
12345
12345

I want to select the column and add a sequence number to each row, but the sequence number should be same for all the rows with '34567' as shown in below table.

Column1Sequence
34567111
34567111
34567111
12345112
12345112
12345112
12345112
12345112
12345112
12345112

How can I achieve this?

This post has been answered by Paulzip on Oct 13 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2016
Added on Oct 13 2016
8 comments
8,014 views