Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 select query help needed

Author  Topic 

rayeesh
Starting Member

2 Posts

Posted - 2014-10-27 : 15:16:19
Hi,
I have 1 table with 1 column having 3 entries , RED,BLUE and GREEN

I need sql which will give unique color combination output like below.


RED,BLUE
RED,GREEN
BLUE GREEN

or

it can be BLUE RED
GREEN RED
GREEN BLUE

Thanks
Rayeesh

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2014-10-27 : 23:05:52
[code]select *
from tbl t1
cross join tbl t2
where t1.col < t2.col
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -