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
Sign In
Register
AdSense Revenue
Active Members
Today
UmaShankar
(660)
Legend
(190)
ravikishore
(149)
Last 7 Days
UmaShankar
(1337)
ANIL PANDEY
(799)
Pradeep Y
(548)
more...
New Feature:
Community Sites
:
Create your own .NET community website and start earning from Google AdSense !
It's Free !
SQL Query to Find the Nth highest Colum Value in a Table.
Posted Date: 23 Jul 2008 Resource Type:
Code Snippets
Category:
SQL
Posted By:
saji
Member Level:
Gold
Rating:
Points
: 2
Let us assume that we have Table with Student Name and Mark. From this table
we have to find out Nth Highest Mark.
SELECT TOP 1 Mark FROM (SELECT TOP {N} Mark FROM Student ORDER BY Mark DESC)
AS E ORDER BY Mark ASC
Where {N}= 2,3,4,5 etc
Eg: For 4th Highest Mark {N}=4
Responses
Author:
mani kumar.k.m
25 Jul 2008
Member Level:
Gold
Points
: 1
Hi saji,
nice example.
its query very useful to lots of guys.
Thanks for sharing your knowledge with us.
thanks & regards
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
Sql
.
Query
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
how to select last inserted record in sqlserver2005
Previous Resource:
Creating Triggers
Return to Discussion Resource Index
Post New Resource
Category:
SQL
Post resources and
earn money
!
Related Resources
To Calculate 30 Working days from the Input Date
Import data directly from excel
How to Drop a Database or Table
How to find out a particular Column in SQL Server
Generate Bill Number with year prefix
dotNet Slackers
BizTalk Adaptors
Web Design
web conferencing services
Contact Us
Privacy Policy
Terms Of Use