There is a big table with "n" of rows and 40 + columns .It
doesn't have primary key.How do you select the primary key.
In other words how do you get the duplicate records.

Answers were Sorted based on User's Feedback



There is a big table with "n" of rows and 40 + columns .It doesn't have primary key...

Answer / nithin

Hi
I could possibly think of only one solution without using
group by clause.

create table emp_bkp as select distinct * from employee
drop table employee
rename emp_bkp to employee

Let me know if there is any other possible answer

Is This Answer Correct ?    3 Yes 1 No

There is a big table with "n" of rows and 40 + columns .It doesn't have primary key...

Answer / harikanth

Suppose Table name is Dup_Del with id as a column(consists
10,20,30,10,10,30,20)then

select * from Dup_Del
where rowid not in(select * from
(select min(rowid) from Dup_Del
group by id
);
the above query will give you the duplicate records. if you
want unique records then

select * from Dup_Del
where rowid in(select * from
(select min(rowid) from Dup_Del
group by id
);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

What are Clusters ?

5 Answers   Amdocs, Infosys,


How to login to the server without an instance?

0 Answers  


Hi All, Recently I attended a interview for a developer position in an educational university. They asked me the a question, I answered somehow but I was not not satisfied myself. Can anybody reply for it? The question is: A business user comes to you directly with an urgent request:: there is a problem with some students not being able to re-enrol. It appears that ?something has gone wrong with the end-dating of some previous courses they had enrolled in, and this is preventing them from completing their on-line re-enrolments?. Fortunately the user has done some analysis on the situation, and has developed some code to change the end dates. They tell you that they have tested this code in the ?dev? environment, and it works fine. They are asking you to please get this implemented in production as soon as possible. What steps would you take in response to their request ? Thanks

2 Answers  


I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance

0 Answers   Cisco,


Explain the use of show option in imp command.

0 Answers  






We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.

0 Answers  


Maximum how many triggers can be updated in table ?

5 Answers   Accenture, Cap Gemini,


Can you tell me how to add new column in existing views?how?How is possible?

0 Answers   FIS,


How to select an oracle system id (sid)?

0 Answers  


what is index?

4 Answers  


What is the maximum number of CHECK constraints that can be defined on a column ?

3 Answers  


How will you identify oracle database software release?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)