consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.
Answers were Sorted based on User's Feedback
Answer / sonal
select * from (select ename, deptno,sal
from emp where deptno in(10 , 20)
order by sal desc)
where rownum < =1
| Is This Answer Correct ? | 2 Yes | 4 No |
Answer / partha
Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 10 order by sal desc) a where
rownum < 2
union
Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 20 order by sal desc) a where
rownum < 2
| Is This Answer Correct ? | 0 Yes | 4 No |
Answer / sumesh s.g
select Name from TBL_Employee
where Salary in(
select max(Salary) from dbo.TBL_Employee
group by DepID
having DepID in(10,20))
--Happy Codding--
| Is This Answer Correct ? | 0 Yes | 5 No |
Answer / nancy
Select ename from table where dept_no in ('10','20') group
by dpt_no
| Is This Answer Correct ? | 4 Yes | 27 No |
Does normalization improve performance?
What is use of trigger?
What is normalisation and its types?
Does mysql_real_escape_string prevent sql injection?
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
what is the difference between join and union? : Sql dba
Explain the the update statement in sql?
Explain two easy sql optimizations.
What is a sql driver?
What is the use of function "module procedure" in pl/sql?
How do I count records in sql?
What is sql and its types?
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)