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.
| Author |
Topic |
|
dr223
Constraint Violating Yak Guru
444 Posts |
Posted - 2009-04-30 : 09:23:42
|
| Hi, I have table (tablea) as shown belowA B C John 12 appleJohn 12 appleJohn 12 cabbageJohn 12 cabbageJames 13 BananaJulie 14 GrapesWhat I want to do is display distinct value from column C with their respective values from A & B. Therefore my output result should look like;John 12 appleJohn 12 cabbageJames 13 BananaJulie 14 GrapesHow can i use the distinct statement to retrieve the data?Thanks |
|
|
whitefang
Enterprise-Level Plonker Who's Not Wrong
272 Posts |
Posted - 2009-04-30 : 09:25:11
|
| SELECT DISTINCT * FROM [table] |
 |
|
|
|
|
|