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 / sri

For example,u have a table called student like below.

STUD-NAME SUBJECT
--------- ------
STUD1 A
STUD2 B
STUD2 A
STUD1 A

in this structure 1 row is duplicated in 4 th. so we can
fetch the student name using the below qry.

SELECT stud-name FROM STUDENT
GROUP BY stud-name,subject
HAVING COUNT > 1.

Is This Answer Correct ?    12 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to move files from one directory to another in pl sql?

1183


What is the purpose of a secondary key?

958


Is sql pronounced sequel or sql?

1259


What is sql query limit?

970


What are different functions in sql?

938


What is a full join?

967


What do you mean by dbms? What are its different types?

1009


What is Materialized View? In What Scenario we Use Materialized View?

9503


Why do we create views in sql?

1146


Advantages and disadvantages of stored procedure?

1118


What is a primary key example?

956


how to get a list of indexes of an existing table? : Sql dba

955


Is ms sql traffic encrypted?

915


what is the functionality of the function htmlentities? : Sql dba

947


What does where 1 1 mean in sql?

1033