Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to retrieve Duplicate Rows only in a Table?
Suppose if a Table Name is "Education". It consists of
multiple columns. Then if we insert rows into this table
with duplicate records then how can we retrieve only
duplicate records from that table?

Answers were Sorted based on User's Feedback



How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / satheesh

SELECT * FROM EDUCATION E1 WHERE ROWID>(SELECT MIN(ROWID)
FROM EDUCATION E2 WHERE E1.EMPID=E2.EMPID)

Is This Answer Correct ?    0 Yes 0 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / sirisha

select id,count(id) from Education group by id having count(id)>1

Is This Answer Correct ?    0 Yes 0 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / aditi yadav

SELECT *FROM Employee
WHERE JoiningDate >= DATEADD(M, -2, GETDATE())

Is This Answer Correct ?    0 Yes 0 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / keerthana

select Student_Name,Dgree from Education
group by (Student_Name,Dgree) having count(*) > 1;

Is This Answer Correct ?    0 Yes 0 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / karthik

i think ths will work!
select * from table_name where rowid in (select max
(rowid) from table_name groupby duplicate_field_name);

Is This Answer Correct ?    0 Yes 1 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / lavanya

SELECT COUNT(*), <COLUMN_NAME> FROM EDUCATION GROUP BY
<COLUMN_NAME>

Is This Answer Correct ?    10 Yes 14 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / guest

unionall

Is This Answer Correct ?    1 Yes 5 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / dawood

SELECT COUNT(EMPNO),ENAME FROM EDUCTION
GROUP BY ENAME;

Is This Answer Correct ?    5 Yes 10 No

How to retrieve Duplicate Rows only in a Table? Suppose if a Table Name is "Education". ..

Answer / harish

select * from education where rownum < ( select max(rownum)
from education group by <column_name> )

Is This Answer Correct ?    15 Yes 24 No

Post New Answer

More SQL PLSQL Interview Questions

What are sql*plus environment variables?

0 Answers  


What is clause?

0 Answers  


What are the different types of PL/SQL program units that can be defined and stored in ORACLE database ?

2 Answers  


What is benefit of creating memory optimized table?

0 Answers  


How to display all Friday's in a year with date?

4 Answers   Flipkart,


there are 2 variables called x and y ,x contains 1,2 and y contains 3,4 we have to swap the values from x to y and y to x with out using dummy variables and it can be done only by using a single statement ? how?

12 Answers   Oracle,


Explain mutating table error.

0 Answers  


In what condition is it good to disable a trigger?

0 Answers  


what are the nonstandard string types? : Sql dba

0 Answers  


what is bcp? When is it used?

0 Answers  


What are the different types of joins and explain them briefly.

3 Answers  


is it possible to pass an object or table to a procedure as an argument?

0 Answers  


Categories