这个sql语句如何写?

[复制链接]
查看11 | 回复1 | 2007-7-6 09:23:59 | 显示全部楼层 |阅读模式
sql = "select * from b where itm='1' and field_name='3'"Set rs = Server.CreateObject("ADODB.RecordSet")rs.Open sql,conn,1,1id_no=rs("id_no")conn.Execute = "update a set tile_no=3 where id_no="&id_nors.movenextlooprs.closeset rs=nothing
回复

使用道具 举报

千问 | 2007-7-6 09:23:59 | 显示全部楼层
这个得用子查询:update a set tile_no=3 where id_no in(select id_no from b where itm=1 and field_name=3)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行