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?

Answer Posted / jay k patel

SQL> select * from emp;

ENO ENAME DOJ DESGN ADDRESS BSAL
---------- ------- --------- ------- ------- ----------
1 jay 04-JAN-80 md vapi 50000
2 vijay 04-FEB-75 manager vapi 7000
1 ajay 12-JAN-77 dba vapi 9000
3 rajay 05-MAR-70 cleark vapi 5000
4 sujay 28-JAN-73 dba vapi 6000
5 jayesh 07-APR-74 cleark vapi 8000
7 jaymin 04-JAN-62 analyst vapi 4000
6 jaynis 10-MAY-69 dba vapi 9000
1 jayur 04-JAN-74 manager vapi 4000
12 jaynil 14-DEC-71 cleark vapi 2000

10 rows selected.

SQL> SELECT desgn , count(*)
2 FROM emp
3 GROUP BY Desgn
4 Having count(*) > 1 ;

DESGN COUNT(*)
------- ----------
cleark 3
dba 3
manager 2

SQL>

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we insert data into materialized view?

912


How do you respond to dementia behavior?

940


What are the different set operators available in sql?

996


How do I access sql anywhere database?

940


How to display Row Number with Records in Oracle SQL Plus?

1013


What is the command used to fetch first 5 characters of the string?

1361


What is a field in a database?

1029


explain the difference between bool, tinyint and bit. : Sql dba

960


What does varchar include?

930


how to create a new table by selecting rows from another table in mysql? : Sql dba

1040


what are different types of keys in sql?

1100


Whis is not false in primary key?

1431


How to run sql functions in pl/sql?

1025


What is dml statement?

922


Is it possible to sort a column using a column alias?

1015