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 variable trace?

0 Answers  


can anybody tell me the architecture for window based application and for the web based application for java as well as dotnet application(web based and for window based).its very very urgent pls

0 Answers  


WHAT ARE THE BUG TRACKING TOOLS USED IN TESTING PROCESS AND WHICH IS BETTER TOOL TO BE USED IN BUG REPORTING ?

2 Answers  


What were your testing responsibilities at your previous employer?

0 Answers  


What is difference between SCSI-2 and SCSI-3 Standard?

0 Answers  


How do you obtain the expected results for testing a search operation?

0 Answers  


what r the contents in usecase?

6 Answers   MBT,


What is PMRS?

1 Answers  


How to track the requirement from bugzilla tools? As our project requirement are changing frequestly and all are tracked in bugzilla tool. How to manage all as all project having short term duration. Please reply back ASAP? Thanks in advanced?

0 Answers   ABC,


The names Sam Fisher and Gordon Freeman associated with mainly? a) Gaming characters b) Organizations CEO’s c) ______ d) ______

4 Answers   EA Electronic Arts,


Spot the 5 differences between the two figures

1 Answers   EA Electronic Arts,


How to hack someone's yahoo or gmail account? what can be the test cases for the same.

0 Answers   Zycus Infotech,


Categories