求一个Update语句的写法,更新的某个字段从查询中取得
Update ProRenamed set NewProjectName=('sdafsdaf'),OriginalProjectName=('从下句查询获得的ProjectName字段名')
where serialID='0000000021'
select ProjectID,ProjectName from Project where ProjectID='0000000001'
我想写成一句,我在一个工作流系统里面自动更新update语句,这个写成一句应该怎么写?
[解决办法]
update ProRenamed set NewProjectName='sdafsdaf',OriginalProjectName=(select ProjectName from Project where ProjectID='0000000001')where serialID='0000000021'
[解决办法]
Update ProRenamed set NewProjectName=('sdafsdaf'),OriginalProjectName=(select ProjectName from Project where ProjectID='0000000001') where serialID='0000000021'