在PL / SQL脚本中,我想捕获受特定语句影响的行数,例如
BEGIN
del_count := { DELETE FROM <SOME_TABLE>}
END
如何实现这一目标?
答案 0 :(得分:2)
使用SQL%ROWCOUNT;
BEGIN
DELETE FROM EMPLOYEES
WHERE MANAGER = 10;
dbms_output.put_line(SQL%ROWCOUNT || ' rows were deleted');
END;