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 are all the different normalizations? : Sql dba
declare lowerl number:= 1; upperl number:= 3; num varchar2(10); begin for i into lowerl..upperl loop num:=num||to_char(lowerl); if i=3 then upperl:=5; end loop; message(num); What will be the output ?
after tell procedure whole code he asked can i write the same way in a function
Types of joins?
Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ?
what is the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?
What is a procedure in pl sql?
Is ms sql is free?
declare v_count number(8,3); v_sal scott.emp.sal%type := '&P_sal'; cursor cur_name is select sal from scott.emp where sal between (v_sal-100) and (v_sal +1000); begin v_count :=nvl(sql%rowcount ,0); if v_count = 0 then dbms_output.put_line('no records are fetch in the given sal range'); else dbms_output.put_line('There is/are '||to_char(v_count)|| ' salaries are selected in the given range '); end if; end; in the above programm .....for any sal range ....always it shows the following message.. no records are fetch in the given sal range please find the mistake and share with me...with thansk and regards..sarao....
Does mysql support pl sql?
Which is better stored procedure or query?
What is package in pl sql?
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)