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.
Which of the following are the key features of TBT agreement?
When was the Recovery of Debts and Bankruptcy Act enacted?
What is the time period for the notice of the general meeting of companies?
According to the IBC who shall constitute the committee of creditors?
Section 6 of the Indian Penal Code is based on the Roman maxim:
When can a creditor, member, or partner of a corporate debtor apply to the Adjudicating Authority to declare undervalued transactions void and reverse i...
Computer software can be included under the definition of goods was held under which of the following cases?
Who are the persons who are not eligible to make an application for the initiation of the corporate insolvency resolution process under the IBC?
Section 87 of Indian Evidence Act, 1872, provides:-
Which of the following cases is also known as “Habeas Corpus Case”?