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 are different types of keys?

1114


How can we solve sql error: ora-00904: invalid identifier?

1258


What is rename in sql?

979


How to fix oracle error ora-00942: table or view does not exist

1020


What is meaning of <> in sql?

1080


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

1042


Can delete statement be rollbacked?

992


Can you call pl/sql package functions from within a fast formula?

1048


Why commit is not used in triggers?

1049


What is sequence in sql?

1032


What is difference between stored procedures and application procedures?

1023


How to run pl sql program in mysql?

1029


How do I enable sql encryption?

1036


Is null operator in sql?

1048


how to create a table index in mysql? : Sql dba

1067