如何利用一条SQL语句实现如下的update功能??? update client_info a set a.product_name=(select b.product_name from product_info b where b.product_id=a.product_id) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 报告说 "a 附近有错误"我改进了一下:update client_info set product_name=b.product_namefrom client_info a, product_info bwhere b.product_id=a.product_id update client_info set product_name=b.product_namefrom client_info a, product_info bwhere b.product_id=a.product_id应该可以 先问一下使用的数据库是什么? mysql? sqlserver? oracle? 不同数据库实现的时候还是有不一样的. 如果是mssql用:update client_info set product_name=(select product_name from product_info where product_info.product_id=client_info.product_id) 对,不同的数库不一样的,如果是sql serverupdate client_info set product_name=b.product_namefrom client_info a, product_info bwhere b.product_id=a.product_id 谢谢各位,我用的是SQLSERVER2000 update product_info set product_name=(select product_name from product_info where product_info.product_id=product_id) update CLIENT_info set product_name=(select product_name from product_info where CLIENT_info.product_id=product_id)测试通过 65道servlet 和ajax初级试题,帮忙! eclipse问题...没装插件的eclipse也可以开发JavaEE? 新手求 XML DEBUG 【分享】Axis WebService 开发指南 什么是MS报表分析啊?---小弟急问 ibatis实现这种情况该如何 谁动了我的Session 寻求达人,servlet的问题 各位兄弟,可有用JSP编写的树形目录(跟数据库绑定),可无限增长! jsp使用标准库新手求教 高分求助简单jsp乱码问题 如何把一个字符串中字符单独取出来??
我改进了一下:
update client_info set product_name=b.product_name
from client_info a, product_info b
where b.product_id=a.product_id
from client_info a, product_info b
where b.product_id=a.product_id
应该可以
update client_info set product_name=b.product_name
from client_info a, product_info b
where b.product_id=a.product_id