asp 数据库删除数据

2025-01-01 11:38:23
推荐回答(3个)
回答1:

改为sql ="delete from [安装] where [业务编号] like "&id&" and [当前状态]='安装施工'" 试下看或把[ ]内的中文改为英文

回答2:

sql ="delete from [安装] where [业务编号] like '*"&id&"*' and [当前状态]='安装施工'"

或者
sql ="delete from [安装] where instr([业务编号],'"&id&"')>0 and [当前状态]='安装施工'"

回答3:

delete from xinghao where id not in ( select max(id) from xinghao group by xinghao ) -- 找到重复的xinghao内容的记录,并且删除之前出现的相同内容的记录,留下最后一次相同记录的内容