Can you get second highest salary from the table?
Answer / Vijay Jha
{"Yes, to retrieve the second highest salary from a table in SQL Server, you can use a combination of subqueries or window functions such as DENSE_RANK() function. Here's an example using DENSE_RANK():"
`SELECT TOP 1 salary FROM employees WHERE salary = ( SELECT TOP 1 DISTINCT MAX(salary) FROM employees WHERE salary < ( SELECT MAX(salary) FROM employees ) );`"
| Is This Answer Correct ? | 0 Yes | 0 No |
What is an Index?
What Is Rdbms?
What would be the Expected Salary For SQL Server Developer for 3 years exp. as per indian market?
What you can do to delete a table without the delete trigger firing?
Please explain what is “asynchronous” communication in sql server service broker?
explain what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
What is blocking in SQL Server? If this situation occurs how to troubleshoot this issue
What is failover clustering overview?
hi i am working as a testengineer , so i want to no the backend data base connection can any one tell mwe in detail
Do you know what are the ways available in sql server to execute sql statements?
how many instance use in sql server 2005
Explain encryption of entire databases without the need for application changes in sql server 2008?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)