sql 删除多条记录

来源:百度知道 编辑:UC知道 时间:2024/05/25 03:38:44
text1=split(Request.form("id"),",")
for i=0 to ubound(text1)
text=text1(i)
sql="delete from gouwuche where Bookisbn='"&text&"'"
conn.Execute(sql)
next
为什么只能删除一条记录
我想删除多条
我的Bookisbn,id都是文本型的总是说类型不匹配,如果是数字型的就可以,为什么啊??难道不能是文本型的??

text1="(" + text1 + ")"
sql="delete from gouwuche where Bookisbn in '"&text&"'"
conn.Execute(sql)

这样就可以了

dim id
<br>id=request.form("id")
<br>if id="" then
<br>response.write"<script>alert('请选择你要删除的信息);history.back();</script>"
<br>response.end
<br>end if
<br>set rs=server.CreateObject("adodb.recordset")
<br>conn.execute("delete from 表 where id in ("&id&")")
<br>response.write"<script>alert('删除成功);history.back();</script>"
<br>response.end
<br>
<br>rs.close: set rs=nothing

什么呀

sssssssssss