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 find out duplicate records in a table(Query)

Answers were Sorted based on User's Feedback



How to find out duplicate records in a table(Query)..

Answer / vishal

try this query

select name,count(*) from X1 (X1 being the table name)
group by name
having count(*)>1

Is This Answer Correct ?    12 Yes 2 No

How to find out duplicate records in a table(Query)..

Answer / madhav

select name,count(name) from mastertable group by name
having count(name)>1

instead of NAME use your own fields


Best of luck

Is This Answer Correct ?    7 Yes 1 No

How to find out duplicate records in a table(Query)..

Answer / santosh

we have to use the group by with having command to get the duplicate values. this query shall show the result of only the users have duplicate values in the employee table.

Syntex:
Select columnName From Table_name
Group By columnName
Having count (*) > 1

Example:
SELECT UserID FROM employee
GROUP BY userid
HAVING count( * ) > 1

Is This Answer Correct ?    4 Yes 0 No

How to find out duplicate records in a table(Query)..

Answer / deepika galankar

if table " stud " contains data :
studid name
1 xyz
2 pqr
3 per
1 xyz

then query is

select name ,count(name) from stud
group by name
having count(name)>1;

thank u .

Is This Answer Correct ?    3 Yes 2 No

How to find out duplicate records in a table(Query)..

Answer / lakshmanlal

hi gud evening all, this is lakshmanlal.k.
suppose my table EMP having one column like ENAME in that i
am having 5 values like lakshman,lakshman,siva,rajesh,kiran
now i am writing query for duplicate records
select ename from EMP(tablename)
group by ename
having count(ename)>1

Is This Answer Correct ?    0 Yes 1 No

How to find out duplicate records in a table(Query)..

Answer / sekhar

select records from table where count(record)>1

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More Testing AllOther Interview Questions

What is white box testing and list the types of white box testing?

0 Answers  


what are Link Speed available for FCOE SAN?

0 Answers  


What are the best practices for software quality assurance?

0 Answers  


hai dis is lavanya... i want to do certification in testing. what are the names of the books tat i have to refer for the certification...

3 Answers  


Explain bug life cycle

3 Answers   CTS, DELL, TCS,


what are the daily activities of a software tester ie the activities carried out by the tester from the time he/she enters the office till the time he/she leaves the office

0 Answers  


test scenarios for downloading a file

0 Answers   ZenQ,


Explain fault?

0 Answers  


What are the main key components in Web applications and client and Server applications? (differences)

1 Answers   TCS,


How will you define a critical bug?

0 Answers  


diff between v model and waterfall model

2 Answers  


What is the formal technical review?

1 Answers   Accenture,


Categories