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 2000 Forums
 SQL Server Development (2000)
 DISTINCT RETURNS SINGLE RECORD AND ID?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-08-20 : 09:51:36
Ricky writes "Can you use Distinct to return both the unique records AND an associated ID for those unique records? I know it's gotta be simple, but I haven't found a way yet.

ex.
Select Distinct companyName
From Company
----------
then I also want companyID of the companyName returned from the same search.
"
   

- Advertisement -