- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Environmental Science
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to find the nth highest salary in SQL ?
This is how we can find the nth highest salary in SQL SERVER using TOP keyword:
SELECT TOP 1 salary FROM ( SELECT DISTINCT TOP N salary FROM Employee ORDER BY salary DESC ) AS temp ORDER BY salary
This is how we can find the nth highest salary in MYSQL using LIMIT keyword:
SELECT salary FROM Employee ORDER BY salary DESC LIMIT N-1, 1
- Related Questions & Answers
- How to insert date in SQL ?
- How to insert multiple rows in SQL ?
- How to Create a Table in SQL – Postgres and MySQL Example Query
- How to delete a column in SQL ?
- What is PL/SQL ?
- What is a trigger in SQL ?
- What is SQL injection ?
- What is Normalization in SQL ?
- What is join in SQL ?
- How can I see all tables in SQL?
- What is MYSQL ?
- What are the types of SQL Queries ?
- How do I view tables in SQL ?
- How to create a database in SQL?
- How to delete a table in SQL ?
- How to change a table name in SQL ?
Advertisements
ads