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.
The accounting software ‘Tally’ was developed by :
In processing cheques, which of the following PO techniques have Indian banks traditionally followed?
Network components are connected to the same cable in the what type of topology ?
Which of the following displays the slide show on a monitor or computer projected large screen in MS-PowerPoint 2019?
Which is the largest unit of storage among the following ?
What command is used to display both query and output?
When pasting text in Microsoft Word 365, what is the default behavior if the destination already contains text?
C is
Which of the following is an example of system software?
To save an existing file with new name at a new location we should us _______ command.