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

any difference between cognos and real time cognos

0 Answers  


10. In Report studio ,how to get the top 20 employees in using list report Row number – if only list  Rank  Running-count

1 Answers   Data Semantics,


What is the difference b/w macros and prompt?

0 Answers  


What are user classes?

1 Answers   HCL,


What is a Cube?

0 Answers  






What is model filter and query filter?

2 Answers   Wipro,


Define olap designer?

0 Answers  


what are the migration tools available in the market with respect to cognos such as impromptu reports are migrated to cognos reportnet?

0 Answers   IBM,


what is model and say about process how to create model and how to test model?

0 Answers   IBM,


how can create a report like if the salary>50,000 display balance,if salary<50,000 display green?

6 Answers   HCL,


Tell me about Schemas?

4 Answers  


please tell me architecture of the cognos8?

4 Answers   IBM, TCS,


Categories