write a query for how to eliminate the duplicate rows
without using distinct?

Answers were Sorted based on User's Feedback



write a query for how to eliminate the duplicate rows without using distinct?..

Answer / mani

DELETE FROM EMP WHERE ROWID NOT IN (SELECT MAX(ROWID)FROM
EMP)GROUP BY EMPNO;

Is This Answer Correct ?    10 Yes 2 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / madhu

DELETE FROM EMP WHERE ROWID NOT IN (SELECT MAX(ROWID)FROM
EMP GROUP BY EMPNO);

Is This Answer Correct ?    6 Yes 0 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / abhishek kumar

select id from tgt_table group by id;

Is This Answer Correct ?    7 Yes 4 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / czarabid

it's very simple the question is to delete the duplicated
records and it's solution is here
DELETE FROM TABLE_NAME1 t1 WHERE ROWID </> any(SELECT ROWID
FROM TABLE_NAME1 t2 WHERE t1.column1=t2.column1);
this will delete only the redundant records leaving only one
copy of the same records in the table.
If you want to delete all the records which are redundant
then the solution is here
DELETE from table_name1 t1 where rowid <> any (select rowid
from table_name1 t2 where t1.no=t2.no)

Is This Answer Correct ?    0 Yes 0 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / murali udayagiri

Assume some duplicate data is there in emp table. Try the
below to eliminate duplicate.

select * from emp
union
select * from emp;


Thanks,
Murali Udayagiri

Is This Answer Correct ?    2 Yes 5 No

write a query for how to eliminate the duplicate rows without using distinct?..

Answer / bharu_295

select count(*),col1,col2 ..... from table_name
groupby col1,col2.....
having count(*)>1

Is This Answer Correct ?    2 Yes 9 No

Post New Answer

More Informatica Interview Questions

what is the end to end process meaning in my project(my project is development)and functionality plz tell me

0 Answers  


what is hash table in informatica?

1 Answers   Zensar,


what is difference between COM & DCOM?

1 Answers   Satyam,


wtite sql query following table are city gender no chennai male 40 chennai female 35 bangalore male 10 bangalore female 25 mumbai female 15 i want the output? city male female chennai 40 35 bangalore 10 25 mumbai null 15

3 Answers   Bank Of America,


What is joiner cache?

2 Answers   TCS,


What is log file,and where is it located,why u r using the log file

1 Answers   TCS,


how can we run workflow with pmcmd?

3 Answers   Wipro,


How to recover the standalone session?

2 Answers  


What is the function of union transformation?

0 Answers  


What is a pre-defined event and user-defined event?

0 Answers  


write sql query following table city gender no chennai male 40 chennai female 35 bangalore male 25 bangalore female 25 mumbai female 15 i want the required output city male female chennai 40 35 bangalore 25 25 mumbai 15

5 Answers   Tech Mahindra,


When do we use dynamic cache and static cache in connected and unconnected lookup transformations?

3 Answers  


Categories