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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
How to generate sequence numbers using expression transformation?
what are 3 tech challenges/ common issues you face?
in performance wise union is past,union all is past
How can you recognise whether or not the newly added rows in the source r gets insert in the target ?
what is DSS?
I want to get an license to produce excel format output using informatica tool. Anyone help me in this issue. Thanks in advance, Vishnuvardhan
In seqence generator transformation maximum limit is reached,after reaching maximum limit how will u insert the data
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?
How can you differentiate between powercenter and power map?
what type of transformation is not supported by mapplets?
Define Incremental Aggregation?
What is DR strategy for Informatica project?