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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-12-20 : 07:54:36
|
| Eric writes "I have a table in which foreign keys can be repeated many times. I only want to select one row representing each foreign key value in table. I want to basically SELECT DISTINCT on a foreign key field. Is this possible?" |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2005-12-20 : 08:34:41
|
| SELECT DISTINCT MyFK -- should do it. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-20 : 08:50:10
|
| SELECT DISTINCT MyFK from ForeignKeysTableMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|