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

what is an execution plan? When would you use it? How would you view the execution plan? : Sql dba

980


What is delimiter in pl sql?

1062


What is primary key and foreign key with example?

932


What is an index in sql with example?

974


How do I turn a list into a table?

963


Explain locks? : Transact sql

1010


how to drop an existing index in mysql? : Sql dba

1069


What is a sql driver?

998


What is vector point function?

1054


How to convert comma separated string to array in pl/sql?

1184


How to fetch values from testtable1 that are not in testtable2 without using not keyword?

1222


What is the use of <> sql?

980


Mention what pl/sql package consists of?

998


How do I create a sql database?

1003


What is the difference between alter trigger and drop trigger statements?

1109