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

What are the different Authentication modes in SQL Server and how can you change authentication mode?

721


What is normalization? What number of normalization shapes are there?

713


What is a rollup clause?

624


How do I completely remove sql server instance?

670


Explain multiserver query

629






Where sql server user names and passwords are stored in sql server? : sql server database administration

652


What is the definition for sql server 2000?

686


Can truncate be rolled back?

617


Difference between group by clause and having clause in SQL?

651


What are the new scripting capabilities of ssms? : sql server management studio

636


What is data modeling and Reterminal integrity?

1582


What is logon trigger?

623


What are the types of database schema? : sql server analysis services, ssas

683


How ssrs maintain security?

676


Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

575