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
Explain what are sparse columns?
What is pessimistic concurrency?
Explain having clause and where clause?
Suggest a method of joining two tables.
How to enforce security in sql server? : sql server security
What is meant by indexing files?
Why do you want to join software field as you have done your BE in Electronics?
What will be the maximum number of indexes per table?
What is sql server replication? : sql server replication
What is Cross Join and in which scenario do we use Cross Join?
What are a database and a data warehouse?
What Is Rdbms?
How to transfer data from a cursor to variables with a "fetch" statement?
What is truncate table?
What is the difference between varchar and nvarchar datatypes?