Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sqllover
Constraint Violating Yak Guru
338 Posts |
Posted - 2007-01-12 : 01:31:54
|
| hi, i have 10 records in my column empno in my table as follows:records are 1,5,8,9,1,7,4,8,9,5.i want to show the repeting records and how many times it is repeted ie countplease give me query for this. |
|
|
ditch
Master Smack Fu Yak Hacker
1466 Posts |
Posted - 2007-01-12 : 01:48:19
|
select empno, count(1) from yourtable group by empnoDuane. |
 |
|
|
madhuotp
Yak Posting Veteran
78 Posts |
Posted - 2007-01-12 : 01:52:17
|
| select EmpNo,Count(*) from Employee group by EmpNo having count(*)>1 |
 |
|
|
|
|
|