What is the PK of this table?Basic idea: Use a group by and having clause.declare @table table (col1 varchar(10), col2 int, col3 datetime, col4 varchar(10), col5 int)insert into @table (col1, col2, col3, col4, col5) select 'karl', 2, '2/12/2005', 'heck', 12 union all select 'karl', 2, '2/12/2005', 'heck', 12 union all select 'karl', 2, '2/13/2005', 'heck', 12select col1, col2, col3from @tablegroup by col1, col2, col3having count(*) > 1
Nathan Skerl