Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Interview Questions
How to find out 3rd Highest Salary?
Posted By :
Posted Date :
August 04, 2010
Select Min(Salary) As Salary from Tablename where Salary In(Select
distinct top 3 salary from tablename order by salary desc)
You can also find related Interview Question to
How to find out 3rd Highest Salary?
How to find out Second highest salary from a table?
select max(salary) from emp where salary not in(select max(salary) from emp)
Findout Top 2 Highest Salary By Using sql query?
Select Top(2) Salary from Table name Where order By Salary Desc
SQL Query to find the 4th highest Value in a Table.
Let us assume that we have Table with Student Name and Mark. We have to Find out 4th highest mark from here?
SELECT TOP 1 Mark FROM
(SELECT TOP 4 Mark FROM Student ORDER BY Mark DESC) AS E
ORDER BY Mark ASC
If you 1Lakh records of employee in a table, then how will you get the 4th highest salary from the table?
SELECT TOP 1 * FROM [EmpTable] WHERE [salary] NOT IN (SELECT DISTINCT TOP 3 salary FROM [temp1] ORDER BY [salary] DESC) ORDER BY salary DESC
Write Query to get nth Highest Salary in SQL Server
Select TOP 1 Salary as
from (SELECT DISTINCT TOP nth Salary from Employee ORDER BY Salary DESC)
a ORDER BY Salary ASC
Which system procedure is used to find out lock details about the databases, it's table and procedures.
How can we find the open transactions details in sql server?
Yes, it is possible.
select * from sysprocesses where open_tran > 0
This query will provide list of all the open transaction details.
How to Find Number of Days for provided date range?
Code extract :
TimeSpan DayDifference = Convert.ToDateTime("2009-1-7").Subtract(Convert.ToDateTime("2009-1-1"));
To find the difference of the days, here we have used Subtract method. The Subtract method does not take start date into consideration. Hence, to get the exact number of days for the date range we need to add one more day to the result.
Response.Write("Number of Days : " + DayDifference.Days+1);
How to find data with generics list in VB.NET (Write code).
In the code example below, the function "FindData" will return list("sublist") of the objects having matchingKey same as viewstate value.
Dim sublist As List(Of MyClass)
sublist = allClient.FindAll(AddressOf FindData) 'sublist will contain objects matching specified matching condition
Function FindData(ByVal b As MyClass) _
If (b.matchingKey = CInt(ViewState("matchingKey "))) Then 'matching condition
How can you find IP address of the client in ASP.net ?
string clientIPAddress = Request.UserHostAddress.ToString();
How can you find ComputerName of the client in ASP.net ?
string ComputerName = WindowsIdentity.GetCurrent().Name.ToString();
How can you find DateTime in ASP.net?
DateTime now = System.DateTime.Now;
How can you find CurrentDate in ASP.net?
string c_date = DateTime.Today.ToString("dd/MM/yyyy");
How can you find CurrentTime in ASP.net?
string c_time = DateTime.Now.ToShortTimeString();
Quick Links For Interview Questions Categories:
Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.
So, Start looking our
section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.
Hall of Fame
Terms of Service
Tell A Friend