首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

更新字段出错解决思路

2012-02-05 
更新字段出错updateemployee set employee.educationidk.educationidfrom (select employeeid ,education

更新字段出错
update employee set employee.educationid=k.educationid
from (select employeeid ,educationid c ,max(beginenddate_enddate) from Employeeeducation
where educationid is not null
group by employeeid,educationid ,[name])k
where k.employeeid=employee.employeeid

[解决办法]
from (select employeeid ,educationid c ,max(beginenddate_enddate) as col from Employeeeducation

[解决办法]

探讨

引用:

注意子查询的别名问题。

你确实是解决问题了,为什么要加这个,我用2000的时候没有这个问题呀,用2008有这个问题
as col 是给哪个取别名

热点排行
Bad Request.