Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
How do I get all the entries in a column, but make it so that there is only one occurance of each unique item.
khtan
In (Som, Ni, Yak)
17689 Posts
Posted - 2006-03-29 : 23:31:34
you can use DISTINCT or GROUP BY
select DISTINCT col1from table1
or
select col1from table1group by col1
KHChoice is an illusion, created between those with power, and those without.Concordantly, while your first question may be the most pertinent, you may or may not realize it is also the most irrelevant