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 |
What are limitations of joiner transformation?
Why you use repository connectivity?
In a sequential batch can you run the session if previous session fails?
need for registering a repository server
I want skip first 5 rows to load in to target? what will be the logic at session level ??
in flatfile target how can u create header and footer plese give me the comands how will u write in session properties
Why the UNION TRANSFERMATION is an Active TRANSFERMATION
why do we go for update strategy tr in SCD rather using the session properties?
Update strategy transformation is an active transformation.How it changes the number of records that pass through it? Please explain....
If you want to create indexes after the load process which transformation you choose?
explain different levels in pushdown optimization with example?
How to Explain My project flow,In TCS ased me this question. In which way i can start my project flow and they asked how many fact tables and dimensional tables u used. Can any one Explain Briefly for this question and project architecture also.. please..
3 Answers CTS, HCL, Infosys, TCS,