利用 distinct 關鍵字過濾重複的行,將查詢的結果寫入臨時表sql
distinct 關鍵字過濾重複的行,將查詢的結果寫入臨時表
select distinct * into #temp from mytable
刪除表spa
delete mytable
將臨時表插入到表中code
insert mytable select *from #temp
釋放臨時表blog
drop #temp