205098/how-to-find-third-or-n-maximum-salary-from-salary-table
Use ROW_NUMBER(if you want a single) or DENSE_RANK(for all related rows):
WITH CTE AS ( SELECT EmpID, EmpName, EmpSalary, RN = ROW_NUMBER() OVER (ORDER BY EmpSalary DESC) FROM dbo.Salary ) SELECT EmpID, EmpName, EmpSalary FROM CTE WHERE RN = @NthRow
To find the 2nd largest salary from ...READ MORE
If you want to find nth Salary ...READ MORE
I was recently requested to create a ...READ MORE
You can try out something like this: SELECT ...READ MORE
Use sp_rename EXEC sp_RENAME 'TableName.PreviousColumnName' , 'NewColumnName', 'COLUMN' See: SQL SERVER ...READ MORE
With 200 records currently, I want to ...READ MORE
How do I query the DateTime database ...READ MORE
I require the minutes-based time difference between ...READ MORE
Use this: SELECT *FROM ...READ MORE
Try this: SELECT ... FROM ( SELECT ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.