select *,identity(int,1,1)id into temp1
update temp1
set field1=''
from temp1 a
where temp1.field1=a.field1 and temp1.id not in (select min(id) from temp1 group by field1 )
select field1,f2,f3 from temp1
drop table temp1
如果你只是显示:
select * into #临时表 from 表
declare @a varchar(100)
update #临时表 set Field1=cast when @a<>Field1 then Field1 else '' end,set @a=Field1
select * from #临时表
drop table #临时表