A function called from SQL statements must obey certain rules meant to control
side effects. (See "Controlling Side Effects of PL/SQL Subprograms" on page 8-9.) To check for violations of the rules, you can use the pragma RESTRICT_REFERENCES.
The pragma asserts that a function does not read and/or write database tables
and/or package variables. (For more information, See Oracle9i Application
Developer’s Guide - Fundamentals.)However, if the function body contains a dynamic INSERT, UPDATE, or DELETE
statement, the function always violates the rules "write no database state" (WNDS)
and "read no database state" (RNDS). That is because dynamic SQL statements are
checked at run time, not at compile time. In an EXECUTE IMMEDIATE statement,
only the INTO clause can be checked at compile time for violations of RNDS.
side effects. (See "Controlling Side Effects of PL/SQL Subprograms" on page 8-9.) To check for violations of the rules, you can use the pragma RESTRICT_REFERENCES.
The pragma asserts that a function does not read and/or write database tables
and/or package variables. (For more information, See Oracle9i Application
Developer’s Guide - Fundamentals.)However, if the function body contains a dynamic INSERT, UPDATE, or DELETE
statement, the function always violates the rules "write no database state" (WNDS)
and "read no database state" (RNDS). That is because dynamic SQL statements are
checked at run time, not at compile time. In an EXECUTE IMMEDIATE statement,
only the INTO clause can be checked at compile time for violations of RNDS.
FormattedName:这个东东就是对象名了就是你FUNCTION的名字
wnds:不写数据库
rnds:不读数据库
wnps:不写package
rnps:不读package
WNDS 不写库
WNPS 不写包
RNDS 不读库
RNPS 不读包
对于希望在sql语句中使用的包中的函数,需要说明这个函数的纯度是不写数据库的。
FormattedName:封装子程序的名
四个参数有不同纯度等级
WNDS 不写库
WNPS 不写包
RNDS 不读库
RNPS 不读包
对于希望在sql语句中使用的包中的函数,需要说明这个函数的纯度是不写数据库的。
我同意