Question
Which of the following query will return the
third-highest salary from an Employee table in SQL?Solution
To get the third-highest salary, the query SELECT salary FROM Employee ORDER BY salary DESC LIMIT 1 OFFSET 2; fetches the salary value after skipping the top two highest salaries. The outer query ensures that we only get the third-highest salary. Why Other Options are Wrong: a) Incorrect usage of LIMIT; it should be OFFSET 2 instead of LIMIT 2, 1. b) This would return multiple rows or result in an error. c) DISTINCT is unnecessary and could result in wrong data if multiple employees have the same salary. e) This query would return the first three salaries in ascending order, not the third-highest.
In dynamic routing, how do routers exchange information about network topology?
Which logic gate produces an output that is the logical sum of two or more inputs?
 Which component is used to store electric charge in an electronic circuit?
In a typical Ethernet LAN, what type of cable is commonly used for wired connections?
Which layer of the OSI model is responsible for logical addressing (e.g., IP addresses) and routing?
How does public key cryptography address the issue of secure key exchange?
Which of the following will occur when we broadcast two packets on the medium at a time?
Which boolean function returns true if and only if all input variables are true?
What is the purpose of the token in a Token Ring network?
Which type of polymorphism is achieved through inheritance and method overriding?