HOW CAN I FIND MAX SAL ,ENAME FROM EMP TABLE.
Answers were Sorted based on User's Feedback
Answer / pramod janjirala
select sal,ename from emp where sal=(select max(sal) from
emp);
| Is This Answer Correct ? | 32 Yes | 7 No |
Answer / chandu
select ename,sal from emp where sal=(select max(sal) from emp);
| Is This Answer Correct ? | 12 Yes | 3 No |
Answer / ram
select sal as Max_sal, ename from emp where sal
IN( select max(sal) from emp);
sun_ramprasad@yahoo.com
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / suresh naik
select sal, ename from emp where sal = (select max(sal) from
emp);
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / pramod janjirala
select max(sal),ename from emp where sal=(select max(sal)
from emp) group by ename;
| Is This Answer Correct ? | 13 Yes | 10 No |
Answer / kavitha
select ename,sal
from employees
where rownum <=1
order by sal desc
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / manoj k
select distinct sal,ename from emp
where sal=(select max(sal) from emp);
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / nagendra
select ename, sal from emp where sal = (select max(Sal) from
emp);
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / selvaraj v , anna university c
select ename, salary from emp where salary=(select max
(salary) from emp) order by emp_no;
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / santosh
select ename,sal
from emp
where sal = (select max(sal) from emp)
and rownum<= 1
| Is This Answer Correct ? | 0 Yes | 0 No |
What is dynamic SQl and how you will create and execute dynamic sql?
how to create a primary key with out creating an index?
what is cursor procedure
Explain exception handling in pl/sql?
oracle is compiler or interpretter,can any one tell me the answer?
how u can find the n row from a table?
What is a design view?
Can we insert data into materialized view?
What are synonyms in sql?
Can you have multiple SPs with the same name on a database?
how to achieve this problem?i am having table with two colums like empno,gender. in gender column, i am having records male,female like that .my final output will be male female 5 6
What is difference between sql and mysql?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)