DBMS
Programming and Technical
Programming
Definition
Find the nth heightest salery
of employee without using subqurey
Read Solution (Total 12)
-
SELECT SAL FROM EMP ORDER BY SAL DESC LIMIT 4,1;- 10 years agoHelpfull: Yes(5) No(0)
- eg 2nd Highest salary from EMP TABLE
SELECT MAX SAL FROM EMP WHERE SAL NOT IN(SELECT MAX SAL FROM EMP); - 10 years agoHelpfull: Yes(4) No(6)
- 2nd max sal
SELECT MAX(SAL) FROM EMP WHERE SAL - 10 years agoHelpfull: Yes(1) No(3)
- SELECT MAX(SALARY) FROM ;
- 10 years agoHelpfull: Yes(0) No(6)
- SELECT * /*This is the outer query part */
FROM Employee Emp1
WHERE (N-1) = ( /* Subquery starts here */
SELECT COUNT(DISTINCT(Emp2.Salary))
FROM Employee Emp2
WHERE Emp2.Salary > Emp1.Salary) - 10 years agoHelpfull: Yes(0) No(2)
- SELECT * FROM
(
SELECT Ename,
Sal,
DENSE_RANK()
OVER
(
ORDER BY SAL DESC
) RANK
FROM Emp
)
WHERE Rank=&giverank; - 10 years agoHelpfull: Yes(0) No(2)
- for 2nd highest sal
select TOP2 from tablename - 10 years agoHelpfull: Yes(0) No(2)
- select Max(salary) from EMP;
- 10 years agoHelpfull: Yes(0) No(1)
- select max(salary) from tablename......!!
am sure... - 10 years agoHelpfull: Yes(0) No(3)
- select max(salary) from emp;
- 10 years agoHelpfull: Yes(0) No(1)
- SELECT *
FROM Employee Emp1
WHERE (1) = (
SELECT COUNT(DISTINCT(Emp2.Salary))
FROM Employee Emp2
WHERE Emp2.Salary > 200) - 9 years agoHelpfull: Yes(0) No(2)
- select Max(salary) from EMPOLYEE:
- 9 years agoHelpfull: Yes(0) No(0)
DBMS Other Question