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
What is difference between table aliases and column aliases? Do they affect performance?
What do you understand by coalesce in sql server?
How do you delete duplicate records in sql server?
What is sparse columns of sql server 2008?
Explain syntax for dropping triggers?
What is the difference between cube operator and rollup operator? : SQL Server Architecture
What is triggers in ms sql server?
What is the difference between sdf and mdf?
What are the types of processing and explain each? : sql server analysis services, ssas
What is key set driven?
How to manipulate data from one table to another table ?
What is replace and stuff function in sql server?
Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?
What is self join in sql server joins?
Explain about integration services of Microsoft SQL server?