Need output in sql server -


i have input below here having 2 columns..one target , 1 reference...here target may have 1 or more references need show in 1 table

table

col1    col2        b        c        d e        f 

expected result

col1    col2        b        c        d b        c        d        e        f f        e 

try this:

select col1, col2 tbl union select col2, col1 tbl 

Comments