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 !




Finding 5th maximum value from the table


Posted Date: 16 May 2007    Resource Type: Code Snippets    Category: SQL

Posted By: Harikaran       Member Level: Silver
Rating:     Points: 5



This SQL Script will help us to find the 5th biggest value from the table. Here am using Products table from Northwind database. We can use this query to find any number of value.

In this example, am using Northwind database and Products table. I have chosen UnitPrice column to find 5th biggest value in it.



select MIN(UnitPrice) from

( select top 5 [UnitPrice] from Products order by UnitPrice desc)

as a1




This query will result "123.7900" in SQL Server2000 as default.




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

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: SQL Server - Finding count of columns in a table
Previous Resource: Automate Reindexing In SQL Server 2000
Return to Discussion Resource Index
Post New Resource
Category: SQL


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

accuconference

Contact Us    Privacy Policy    Terms Of Use