茂名高州:请教一条删除的SQL语句
来源:百度文库 编辑:神马品牌网 时间:2024/05/02 21:51:00
如何从表table1中删除,字段ip相同的记录,但要保留一条,不能全删除了。
select distinct * into #Tmp from table1
drop table table1
select * into table1 from #Tmp
drop table #Tmp
呵呵,相互转了一下哈,厉害厉害
神马品牌网是一部内容开放、自由的互动网络百科全书
客观、专业、权威的知识性百科全书
来源:百度文库 编辑:神马品牌网 时间:2024/05/02 21:51:00
select distinct * into #Tmp from table1
drop table table1
select * into table1 from #Tmp
drop table #Tmp
呵呵,相互转了一下哈,厉害厉害