
- Forum
- Databases
- SQL Server - How we can find the nth higest number in MSSQL?
-
Junior Member
How we can find the nth higest number in MSSQL?
How we can find the nth higest number in MSSQL?
-
Re: How we can find the nth higest number in MSSQL?
What do you mean by nth higest number . Are you trying to find out nth heighest value from a table . Like 10th heighest salary or 5th elder person. Please specify your requirment clearly.
-
Junior Member
Re: How we can find the nth higest number in MSSQL?
select max(coloumn-name) from Table-name
try out this it will give the n-th highest number
-
Junior Member
Re: How we can find the nth higest number in MSSQL?
To fine the N-th highest number you can use the subquery and substitute with the desired number:
SELECT MIN(ColumnName) FROM TableName WHERE ColumnName IN (SELECT TOP ColumnName FROM TableName ORDER BY ColumnName DESC)
-
Junior Member
Re: How we can find the nth higest number in MSSQL?
select * from emp e1 where n=(select count(Distinct e2.sal) from emp e2 where e1.sal<=e2.sal);
in "n" place u can give any no 0k.... it is working...
ALL THE BEST
-
Junior Member
Re: How we can find the nth higest number in MSSQL?
Hi, can any one tell me is it possible to install informatica tool in linux operating systems.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules