回 帖 发 新 帖 刷新版面

主题:子查询多个时怎么解决

sql语句:update anchorurl set anchordocid=(select docid from WebPageInfo where url=anchorurl.anchorurl);
 错误提示,是子查询多于一个,应该怎么解决啊?

回复列表 (共2个回复)

沙发

update anchorurl 
set anchordocid= t.docid,
from anchorurl,WebPageInfo
where anchorurl.anchorurl = WebPageInfo.url

不需要用到子查询.

板凳

Thanks very much.多谢了

我来回复

您尚未登录,请登录后再回复。点此登录或注册