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 user stored procedure & it purpose?
How many types of system privileges are there, Can we add or delete privileges?
Wht is SQL Injection Attack ?
How we Resize table,temp table, database and log file size in SQL Server 2005
hw you create table in sql using existing table and variable should be in specific order given ex : in old table empid empname empsal empage empbirthdate empaddrs like is there in new table we need it as EX: exmpname empage empaddrs empid empbirthdate like we want hw we create this as a table not view or nt reporting
Can we add an identity column to decimal datatype?
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?
How to restart SQL Server in single user mode? How to start SQL Server in minimal configuration mode?
What is deploy, process and build? : sql server analysis services, ssas
How to specify the collation for a character data type in ms sql server?
What is the difference between implicit and explicit transaction?
In which situation you use Self joins?
1 Answers CarrizalSoft Technologies, HP, TCS,
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)