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

Which version of sql do I have?

1034


What are actual parameters and formal parameters?

1081


What is clustered and nonclustered index in sql?

926


What is interval partition?

1039


What is difference between sql and excel?

1067


What is assignment operator in pl sql?

1014


Which nosql database is best?

961


What are the benefits of triggers?

1155


Explain the difference between sql and mysql.

1037


What sql database should I use?

1120


Is a foreign key always unique?

921


How do you delete duplicates in sql query using rowid?

924


How do you run a query?

978


how to get @@error and @@rowcount at the same time? : Sql dba

1006


Is sql easier than java?

988