貌似ORACLE中没有
UPDATE 表 SET 字段=表2.字段 FROM 表2 这个语法,SQL2000里这句是正确的;
ORACLE中实现相同的功能用以下代码:
Code
UPDATE am_approve_list_log_sammy a
SET (a.emp_id, a.approver_sequence, a.approver_id) =
(SELECT b.emp_id, b.approver_sequence, b.approver_id
FROM am_approve_list_sammy b
WHERE b.emp_id = a.emp_id AND b.approver_id = a.approver_id)
WHERE EXISTS (SELECT 1
FROM am_approve_list_sammy c
WHERE c.emp_id = a.emp_id AND c.approver_id = a.approver_id)