ms sql删除重复的记录

作者:未知 来源:未知 添加时间:2006-07-03 字体:大 中 小

  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'
开启。默认值是关闭的。

ppdesk