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.
Answers were Sorted based on User's Feedback
Answer / kumar.t
Select Emp_Id, Count(Emp_Id) From Employee As Emp
Group By Emp_Id
Having Count(Emp_Id)>1
By
Kumar
| Is This Answer Correct ? | 17 Yes | 2 No |
Answer / 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 |
Answer / v rajkumar
select Emp_Id from Employee group by Emp_Id having count(*)
>1
| Is This Answer Correct ? | 1 Yes | 0 No |
What is a Trace frag?Where can we use this?
what is integrated security (SSPI). why we use in the connection string?
What is a view and what are its advantages?
How to write a query with an inner join in ms sql server?
How will you know when statistics on a table are obsolete?
I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that
What happens to a statement batch if there is a compilation error?
how do u do Performance tunning ?
1 Answers Infodat Technologies, Satyam,
What is the use of keyword with encryption. Create a store procedure with encryption?
John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?
What is enhanced database mirroring in sql server 2008?
What is blocking in SQL Server? If this situation occurs how to troubleshoot this issue
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)