如何用SQL删除一个表中重复的一条记录?
我这边只会用SQL查找出来,如:select phonenumber as phonenumber from liantonghao where phonenumber in (select phonenumber from liantonghao as tem group by phonenumber HAVING Count(*)>1 );
怎么删除其中一个就不会啦
我这边只会用SQL查找出来,如:select phonenumber as phonenumber from liantonghao where phonenumber in (select phonenumber from liantonghao as tem group by phonenumber HAVING Count(*)>1 );
怎么删除其中一个就不会啦
select distinct * into # from yTableName
drop table tableName
select * into tableName from #
drop table #
from liantonghao truncate table liantonghao insert into liantonghao
select * from #t