2
Answers

Concatenate rows into one row in sql with serial number

Mithila Das

Mithila Das

Mar 14
96
1

I have a data table Employee like below. I want to Concatenate Name columns into one columns with serial number

Name Father Name
Mr. James Mr. Lucas
Mr. Mateo Mr. William
Mr. Noah Mr. William

I want following output for name column

Name
(1) Mr. James (2) Mr. Mateo (3) Mr. Noah

And output for Father Name column

Father Name
(1) Mr. Lucas (2) & (3) Mr. William

How to do it? 

Answers (2)