*
from
dowlond_biao
where
classname
like
'"&searchname&"'"
改成
sql="select
distinct
*
from
dowlond_biao
where
classname
like
'"&searchname&"'"
for(select
s.id,s.name,s.num,count(1),max(rowid)
max_rowid
from
student
s
group
by
s.id,s.name,s.num
having
count(1)>1)
loop
delete
from
student
where
rowid<>cur.max_rowid
and
id=cur.id
and
name=cur.name
and
num=cur.num
end
loop
for cur (select s.id,s.name,s.num,count(1),max(rowid) max_rowid from student s group by s.id,s.name,s.num having count(1)>1)loop
delete from student where rowid<>cur.max_rowid and id=cur.id and name=cur.name and num=cur.num
end loop
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)