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
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 |
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 |
6. Display the client name and order date for all orders using the traditional method.
What are ACID properties in databases?
24. Display the order number for all orders whose average item cost is greater than the overall average item cost across all orders.
How would you begin to troubleshoot an ORA-3113 error?
How would you best determine why your MVIEW couldnt FAST REFRESH?
What are a query and state the different types of queries and their uses?
How do you recover a datafile that has not been physically been backed up since its creation and has been deleted. Provide syntax example.
I have a table emp. There is only one column in the table. In that , there are only three rows in that column. The value in the first row is 'A' and the value in the second row is 'B' and the third row is 'C'. Now, my question is , How will you write a select query to display the output as B C A Note: order by cannot be used coz it gives us output as CBA. But the output should be BCA.
Hello All, Could any one provide me FAQs/interview questions on oracle PL/SQL
I have a database backup file in .db (ext) form how to conver it into .dmp (ext.) for oracle database
How to use "while" statements in oracle?
How to get last row id?