sql语句这么改:
update workxx set jiaci=w.jiaci-1 from workxx w inner join
qingjia q on q.id=w.id where q.qid=...
在update之前,你先执行以下select 语句好不好使.select 不好使,说明语法有错误。
你的语句改成select 语句:
select jiaci from workxx where workxx.id=qingjia.id and qingjia.id=(select qingjia.id from qingjia where qingjia.qid=‘值’)
嗯,1楼是正确的:
exec="update workxx set jiaci=jiaci-1 from workxx w inner join
qingjia q on q.id=w.id where q.qid ='"+request.form("qid")+"')"