Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

how to find 2nd highest salary in mysql

#2nd Most highest salary using dense_rank()
SELECT sal 
FROM (SELECT dense_rank() over(ORDER BY sal DESC) AS R, sal FROM emp) employee 
WHERE R = 2;
Source by www.java67.com #
 
PREVIOUS NEXT
Tagged: #find #highest #salary #mysql
ADD COMMENT
Topic
Name
4+9 =