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...

i want only duplicates rows from coloumn
ex. emp_id(colomn name)1,1,2,3,3,4,5,5.

so i want only duplicates no.

Answer Posted / chinna_g

You have 'emp' table with empid,empname,empsal.
With values:
1 row:1,'hhh',10000
2 row:2,'nnn',10000
3 row:3,'vvv',15000
4 row:4,'jjj',10000

A)
In this table you have sal column 10000 repeating 3 times
in the table, if you want to retrieve the repeated values
i.e. the salary column with 3 times to be displayed in the
following query:

"select empsal from emp where empsal in(select empsal from
emp group by empsal having count(empsal)>1);"

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are sparse columns?

935


What is pessimistic concurrency?

924


Explain having clause and where clause?

993


Suggest a method of joining two tables.

1104


How to enforce security in sql server? : sql server security

1044


What is meant by indexing files?

988


Why do you want to join software field as you have done your BE in Electronics?

2106


What will be the maximum number of indexes per table?

913


What is sql server replication? : sql server replication

925


What is Cross Join and in which scenario do we use Cross Join?

978


What are a database and a data warehouse?

972


What Is Rdbms?

1087


How to transfer data from a cursor to variables with a "fetch" statement?

1024


What is truncate table?

895


What is the difference between varchar and nvarchar datatypes?

1038