增加authid,like this: CREATE OR REPLACE procedure DEMO(ID in NUMBER) AUTHID CURRENT_USER as ... BEGIN ...
END DEMO; Oracle Docs :AUTHID CURRENT_USERSpecify CURRENT_USER to indicate that the package executes with the privileges of CURRENT_USER. This clause creates an invoker's rights package.This clause also specifies that external names in queries, DML operations, and dynamic SQL statements resolve in the schema of CURRENT_USER. External names in all other statements resolve in the schema in which the package resides.AUTHID DEFINERSpecify DEFINER to indicate that the package executes with the privileges of the owner of the schema in which the package resides and that external names resolve in the schema where the package resides. This is the default and creates a definer's rights package.
“GRANT EXECUTE ON PROCEDURE TO USER. ”具体到调用某一条存储过程怎么写???
比如A对T1表只有select权限,然而存储过程P1对T1有修改的操作,把执行存储过程P1的权限给了A之后,A执行P1时也可以修改T1,怎么回事,如何让A保持原来的只有select的权限???
...
BEGIN
...
END DEMO; Oracle Docs :AUTHID CURRENT_USERSpecify CURRENT_USER to indicate that the package executes with the privileges
of CURRENT_USER. This clause creates an invoker's rights package.This clause also specifies that external names in queries, DML operations,
and dynamic SQL statements resolve in the schema of CURRENT_USER.
External names in all other statements resolve in the schema
in which the package resides.AUTHID DEFINERSpecify DEFINER to indicate that the package executes with the privileges
of the owner of the schema in which the package resides and that external
names resolve in the schema where the package resides.
This is the default and creates a definer's rights package.