C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




query


Posted Date: 27 Aug 2008      Total Responses: 3

Posted By: satish kumar thota       Member Level: Gold     Points: 1


How to get top 3 minimum salaries in sql server 2000

empid ename sal
101 a 20000
102 b 10000
103 c 12000
104 d 8000
105 e 24000




Responses

Author: saroop    27 Aug 2008Member Level: SilverRating:     Points: 0
select top 3 sal from "table" order by sal asc


Author: kalaimanichozhan    27 Aug 2008Member Level: GoldRating:     Points: 0
select top 3 sal from salary order by sal


Author: palla    28 Aug 2008Member Level: SilverRating:     Points: 3

hi
we can use this select if we doesnt use top keyword.
select e1.sal
from emp e1 where 3>(select count(distinct(e2.sal))
from emp e2 where e2.sal>e1.sal)
order by e1.sal



Post Reply
You must Sign In to post a response.
Next : insert XML data
Previous : DBMS and RDBMS
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

online optimum rewards

Contact Us    Privacy Policy    Terms Of Use