From an Employee table, how will you display the record
which has a maximum salary?

Answers were Sorted based on User's Feedback



From an Employee table, how will you display the record which has a maximum salary?..

Answer / hari

select max(sal) from employee;
or
select * from employee where sal in(select max(sal) from employee);

Is This Answer Correct ?    0 Yes 0 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / venubabu addagada

SELECT DISTINCT
( e.emp_salary )
FROM
employee e
WHERE
&n = (
SELECT
COUNT(DISTINCT(e1.emp_salary) )
FROM
employee e1
WHERE
e1.emp_salary > e.emp_salary
);

Is This Answer Correct ?    0 Yes 0 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / sudeep mishra

select *
from employee
where salary = max sal

Is This Answer Correct ?    0 Yes 1 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / senthilkumar

SELECT MAX(SAL)AS MAXIMUMSALARY FROM EMP

Is This Answer Correct ?    1 Yes 3 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / suresh babu

SELECT * FROM employees WHERE salary = (SELECT MAX(salary)
FROM employees);

This query will return the employee details,who getting
maximum salary.

Is This Answer Correct ?    0 Yes 2 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / suma

SELECT emp_name, salary FROM EMPLOYEES E1
WHERE (0) = (SELECT COUNT(DISTINCT(E2.salary))
FROM EMPLOYEES E2
WHERE E1.salary < E2.salary)

Is This Answer Correct ?    13 Yes 16 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / royals

select max (esal) as maximumsal from employee;

Is This Answer Correct ?    5 Yes 10 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / jayshree

SELECT LAST_NAME,MAX(SALARY)
FROM EMPLOYEES
GROUP_BY SALARY;

Is This Answer Correct ?    2 Yes 8 No

From an Employee table, how will you display the record which has a maximum salary?..

Answer / sanjeev

select max(sal) from emp

Is This Answer Correct ?    5 Yes 14 No

Post New Answer

More SQL PLSQL Interview Questions

What is multiple columns?

0 Answers  


Which clause of an UPDATE statement allows you to affect only certain rows of a table? 1. The WHERE clause 2. The SET clause 3. The ROWS AFFECTED clause 4. The ORDER BY clause

6 Answers   HCL,


What are sql functions? Describe the different types of sql functions?

0 Answers  


What is INSTEAD OF trigger ?

13 Answers   Hexaware, TCS,


What is the difference between the conventional and direct path loads? : aql loader

0 Answers  






Write an sql query to select all records from the table?

0 Answers  


Is join same as left join?

0 Answers  


Is pl sql different from sql?

0 Answers  


What is sql*plus?

0 Answers  


How can you fetch first 5 characters of the string?

0 Answers  


What is a Procedure ?

3 Answers  


What is difference between sql and mysql?

0 Answers  


Categories