I have a very huge data but some of data has been duplicated such as for Example First Row has name "Sushil" and other row has name "Sushil and Other" the relevant details of both rows are same. So how can i find such a data. Please Help..!
Asked
Active
Viewed 112 times
-4
-
which DBMS are you using? mySQL or SQL server? Don't tag products you aren't using!! – Takarii May 06 '16 at 10:01
-
I am Using Mysql DBMS – Sushiloo May 06 '16 at 10:20
-
then you should untag SQL server – Takarii May 06 '16 at 10:22
-
How pls tell me the procedure.. – Sushiloo May 06 '16 at 10:30
-
I still not get the Answer...Brother – Sushiloo May 07 '16 at 05:01
2 Answers
1
You have to write the aggregate functions to find the counts of duplicated fields (By using Group By Clause).
refer the below answer

Community
- 1
- 1

BOBIN JOSEPH
- 1,012
- 8
- 25
-
-
hallo brother..can we find the data like within same ROW the data is enter like FIRST row has "JOHN" name and somewhere else in same ROW it is enter as "JOHN And Others"..So i want to find both the data fro tables.. – Sushiloo May 06 '16 at 10:08
-
0
Suppose you have this table
CREATE TABLE [dbo].[Table_1](
[name] [nchar](10) NULL,
[age] [int] NULL
) ON [PRIMARY]
you can execute the following query on this table
SELECT t.*, COUNT(*) as DuplicateRecords
FROM Table_1 t
group by t.name,t.age having COUNT(*)>=2
the result set would contain rows that are duplicated.

Sam
- 2,935
- 1
- 19
- 26
-
-
-
Brother..your query is executing properly..but not in way that i want – Sushiloo May 09 '16 at 12:32
-
My problem is that I want to show all data that is entered as in For Ex. in a First_name column First_name is "SUSHIL" and somewhere in another row within same column i.e. in First_name data is enterd as "SUSHIL and Other" and other details like mob. No and etc of both "SUSHIL" and "SUSHIL and Other" is same i.e. Repeated – Sushiloo May 09 '16 at 12:36
-
`select * from table where firstname like '%and Other%'` Execute this query – Sam May 10 '16 at 05:14