From an Employee table, how will you display the record
which has a maximum salary?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / sudeep mishra
select *
from employee
where salary = max sal
Is This Answer Correct ? | 0 Yes | 1 No |
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 |
Answer / jayshree
SELECT LAST_NAME,MAX(SALARY)
FROM EMPLOYEES
GROUP_BY SALARY;
Is This Answer Correct ? | 2 Yes | 8 No |
is mysql query is case sensitive? : Sql dba
What are the various restrictions imposed on view in terms of dml?
using comand prompt how can import table data and table space with example
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.
What are the differences between Database Trigger and Integrity constraints ?
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.
what is difference between procedure and function, procedure and trigger?
Define sql delete statement.
Can one improve the performance of sql*loader? : aql loader
What is sql indexing?
What is the syntax to add a record to a table?
What are the two parts of a procedure ?