select distinct * into #table_name from table_name
delete from table_name
select * into table_name from #table_name
drop table #table_name
與此相關的是“select into”選項,可以在數據庫屬性對話框中,勾起來此項,或者在Query Analyzer中執行execute sp_dboption ''db_name'',''select into'',''true''開啟。默認值是關閉的。