Hanusha Loujith

Hanusha Loujith

  • NA
  • 292
  • 9.2k

SQL Query for returning all the possible combinations of a column

Jun 29 2021 1:26 PM

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)