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)
 get the unique values

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-04-10 : 09:38:58
kiran writes "How can I get unique values from the data base"

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-10 : 09:41:00
select newid()



KH


Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-04-10 : 09:41:23
Try:
SELECT DISTINCT [YourColumns] FROM [YourTable]
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-04-10 : 11:17:21
hmmmm did i read the question wrongly ?



KH


Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-04-10 : 12:00:16
One of us did, guaranteed.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2006-04-10 : 13:28:19
Add unique contraints.

Can't help chipping in
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-04-10 : 13:47:35
quote:
Originally posted by AskSQLTeam

kiran writes "How can I get unique values from the data base"

Unique up on dem vewy qwietly.
Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2006-04-10 : 15:02:26
*LOL*
Go to Top of Page
   

- Advertisement -