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 2005 Forums
 Transact-SQL (2005)
 Please help

Author  Topic 

Maharisi
Starting Member

19 Posts

Posted - 2008-11-05 : 02:42:33
I have TABLE
ID Count Centre
================
1 5 RO
1 6 TO

I need acquire row with Minimal Count.
Thank you

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-05 : 02:46:38
[code]SELECT TOP (1) WITH TIES * FROM TABLE ORDER BY Count[/code]

[code]SELECT * FROM TABLE WHERE Count=(SELECT MIN(Count) FROM TABLE)[/code]
Go to Top of Page

Maharisi
Starting Member

19 Posts

Posted - 2008-11-05 : 02:52:24
Thank you so much
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-05 : 02:55:39
Cheers
Go to Top of Page
   

- Advertisement -