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!

return all combination of value from a column in one table?

FushanJul 23 2015 — edited Jul 23 2015

I have a table A with 2 columns

table A :

id               Name

1                A

2               B

3                CC

4               D

I need a SQL or pl/sql to return all possible combination like this

A

A,B

A,CCC

B,CCC

A,B,CCC

A,B,D

A,CCC,D

B,CCC,D

A,B,CCC,D

<  I hope I did not miss any combination....>

I that possible?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2015
Added on Jul 23 2015
8 comments
479 views