xiaojian(萧剑) 或者高手 麻烦进来解决一下啊 在线等啊
原问题地址:
http://community.csdn.net/Expert/topic/5466/5466470.xml?temp=.3213007
------解决方案--------------------Delete * From art where id not in(Select min(id) from art group by art_title)
像这个sql语句,用conn.execute(sql)来执行
sql=Delete * From art where id not in(Select min(id) from art group by art_title)
------解决方案--------------------原来你不会啊,早说嘛。
<%
ConnStr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source = " & Server.MapPath( "3609664.mdb ")
Set conn = Server.CreateObject( "ADODB.Connection ")
conn.open connstr
conn.execute( "Delete * From art where id not in(Select min(id) from art group by art_title) ")
conn.close
set conn=nothing
Response.Write( "已经成功清除冗余数据! ")
%>
以上代码,另存成asp文件,放数据库同个目录里。然后浏览下就OK了。
其中id等相应字段名称请自己核对。