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 only duplicate values in a table

Answer Posted / kirankumar.vangeti

For the same example given in the answer 1

select studentname, subject, count(studentname) as count
from student
group by studentname, subject
having (count(studentname)>1);

above query will give the results like

STUD1 A 2

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute a stored procedure?

1077


How do you write an index?

962


what is sql? : Sql dba

1017


What are the types of sql commands?

1088


What are instead of triggers?

1035


What is the difference between rollback and rollback to statements?

1056


what is schema? : Sql dba

1040


What is a sql statement?

945


what is the stuff function and how does it differ from the replace function? : Sql dba

1036


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2564


What is sqlerrm?

927


What has stored procedures in sql?

1055


Is microsoft sql free?

1093


what are the advantages and disadvantages of cascading style sheets? : Sql dba

1045


What is sql table?

959