how will u get 1 and 3rd and 5th records in table what is
the query in oracle please help me

Answers were Sorted based on User's Feedback



how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / kondeti srinivas

Select * from (select rownum as rn, emp.* from emp) where
rn in (1,3,5);

Is This Answer Correct ?    22 Yes 0 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / suresh

TO DISPLAY THE EVEN NUMBERS
SELECT ROWNUM,EMPNO,ENAME,SAL FROM EMP
GROUP BY ROWNUM,EMPNO,ENAME,SAL
HAVING MOD(ROWNUM,2)=0;


TO DISPLAY THE ODD NUMBER IS TO REPLACE ONLY MOD(ROWNUM,2)!=0

Is This Answer Correct ?    9 Yes 0 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / siva reddy

display odd records
select * from emp where (rowid,1) in ( select
rowid,mod(rownum,2) from emp)

display even records

select * from emp where (rowid,0) in ( select
rowid,mod(rownum,2) from emp)

Is This Answer Correct ?    10 Yes 5 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / amedela chandra sekhar

Select * from (select rownum as rno, emp.* from emp) where
rno in (1,2,5);

Is This Answer Correct ?    6 Yes 2 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / amedela chandra sekhar

Select * from (select rownum as rno, emp.* from emp) where
rno in (1,3,5);

Is This Answer Correct ?    4 Yes 0 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / gyana

SELECT RN,EMPNO,ENAME,SAL FROM
(SELECT ROWNUM RN,EMPNO,ENAME,SAL FROM EMP)
WHERE RN IN (1,3,5)

---------------------------------------------------
I ALREADY TESTED ITS WORKING..PLS ANY CORRECTION LET ME KNOW

Is This Answer Correct ?    3 Yes 0 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / sp hari

select * from emp where rowid=(select
decode(mod(rownum,2),0,null,rowid) from emp)

Is This Answer Correct ?    4 Yes 1 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / kondeti srinivas

select * from emp where (rowid,1) in (select rowid,mod(rownum,2) from emp where rownum<=5)

Is This Answer Correct ?    1 Yes 0 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / anjan

select rownum,empno,ename,sal from (select
rownum,empno,ename,sal from emp)
group by rownum,empno,ename,sal
having rownum in (1,3,5)

Is This Answer Correct ?    1 Yes 0 No

how will u get 1 and 3rd and 5th records in table what is the query in oracle please help me..

Answer / uma

select * from (select rownum rn,ename,job,sal
from emp)
where mod(rn,2) <> 0;

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Informatica Interview Questions

How to generate sequence numbers using expression transformation?

0 Answers   Informatica,


what are 3 tech challenges/ common issues you face?

0 Answers   TCS,


in performance wise union is past,union all is past

2 Answers  


How can you recognise whether or not the newly added rows in the source r gets insert in the target ?

2 Answers  


what is DSS?

3 Answers  






I want to get an license to produce excel format output using informatica tool. Anyone help me in this issue. Thanks in advance, Vishnuvardhan

1 Answers  


In seqence generator transformation maximum limit is reached,after reaching maximum limit how will u insert the data

2 Answers   HCL, Schneider,


following source name gender ramya female ram male deesha female david male kumar male i want the target male female ram ramya david deesha kumar any body give solution above question?

4 Answers   TCS,


How can you differentiate between powercenter and power map?

0 Answers  


what type of transformation is not supported by mapplets?

4 Answers   CTS,


Define Incremental Aggregation?

2 Answers  


What is DR strategy for Informatica project?

0 Answers  


Categories