在下面的程序中,我对更新锁有点困惑
CREATE OR REPLACE
PROCEDURE pro_cedure(
p_dept_id NUMBER )
IS
CURSOR mycursor
IS
SELECT deptno,comm,extra
FROM emp
WHERE comm IS NULL
AND extra IS NOT NULL
AND deptno = p_dept_id
FOR UPDATE OF comm;
BEGIN
FOR emp_rec IN mycursor
LOOP
UPDATE emp SET comm = extra
WHERE CURRENT OF mycursor;
INSERT INTO changed
(
deptno,
oldval,
newval,
seq_nextval
)
VALUES
(
emp_rec.deptno,
emp_rec.comm,
emp_rec.extra,
sequence_name.nextval
);
END LOOP;
END;
如果其他用户在我更新时尝试更新同一个表或同一行,是否会导致该程序锁定?