write a query to display the third record from the employee
table?

Answers were Sorted based on User's Feedback



write a query to display the third record from the employee table?..

Answer / m m naidu

To display the 3rd record of emp table we can write query as
select * from emp where rownum<4 minus select * from emp
where rownum<3;

Is This Answer Correct ?    6 Yes 1 No

write a query to display the third record from the employee table?..

Answer / srinu

select * from (select rownum r,emp.* from emp) where r=3;

Is This Answer Correct ?    3 Yes 1 No

write a query to display the third record from the employee table?..

Answer / j

select * from emp e where 3=(select count(sal) from emp
where e.sal>sal)

Is This Answer Correct ?    3 Yes 2 No

write a query to display the third record from the employee table?..

Answer / i.anil

select a.*,rownum from
(select b.*,rownum rk from
(select * from emp )b)a where rk=3;

Is This Answer Correct ?    1 Yes 0 No

write a query to display the third record from the employee table?..

Answer / vsandhyana

select top 1 * from (select top 3 * from employee order by
employeeid desc) emp

Thanks
Vsandhyana

Is This Answer Correct ?    0 Yes 0 No

write a query to display the third record from the employee table?..

Answer / ammu

select * from emp e where 4=(select count(sal) from emp
where e.sal>sal)

Because it follows n-1 rule..

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Cognos Interview Questions

What actually a project contains?

0 Answers  


Once reports are delivered to client, how will they inform back? If they are experiencing any problem in the reports.

2 Answers  


if we have a value prompt in a prompt page and if we need to pass that prompt value to a sql used in report, what is the sql code? give me example?

3 Answers   ComNet,


how can you get the errors in job? when loops are araised we get error?

0 Answers   Syntel,


-----------------What is Direct and Conventional loading?

0 Answers  






can any body explain clearly how to explain any (sales) project in interview.actually feom where report developer work starts?pls reply as soon as possible.

8 Answers   Mind Tree,


can we create a chart without measure

3 Answers  


Hi,Can anyone tell me training centre for cognos in Mumbai?

4 Answers  


Write a SQL query which should fetch the 5th maximum salary of an employee from the table?

14 Answers   HCL,


Can you define fan trap?

0 Answers  


What is the difference between group and associare?

0 Answers  


how can I test reports in cagnos?

0 Answers   IBM,


Categories