2
Answers

SQL Query for returning all the possible combinations of a column

Anu

Anu

3y
2.3k
1

Hello,

I have a table with column values like below in an SQL server database.

Values
A
B
C

I need output like below

Output
a,b,c
a,c,b
b,c,a
b,a,c
c,a,b
c,b,a

Can some one please check and help me to provide the solution?

Answers (2)