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

is mysql query is case sensitive? : Sql dba

0 Answers  


What are the various restrictions imposed on view in terms of dml?

0 Answers  


using comand prompt how can import table data and table space with example

2 Answers  


How we get all_group_function's(Sum,avg,count,max and min_value of a column(Sal) Using pl/sql anonymous block, with out using group function's. You shouldn't use more than one select statement in entire the program. Like cursor c is select * from <table_name>; except this you can't use another select statement. You can use no of variables as per requirement.

1 Answers  


What are the differences between Database Trigger and Integrity constraints ?

4 Answers  






I have 2 table A and B. In A 1 lakh record is present. In b 20 thousand data is present. To get the unique data from table A and B which join we should prefer left inner join or right outer join. Please answer.

4 Answers   GE,


what is difference between procedure and function, procedure and trigger?

8 Answers   iFlex,


Define sql delete statement.

0 Answers  


Can one improve the performance of sql*loader? : aql loader

0 Answers  


What is sql indexing?

0 Answers  


What is the syntax to add a record to a table?

0 Answers  


What are the two parts of a procedure ?

6 Answers   Hi Caliber IT,


Categories