Parameterized Statements in PL/SQL Oracle PL/SQL offers also the possibility of using parameterized queries in database-level code. PL/SQL supports binding parameters using the colon character with an index (e.g., :1). The following example demonstrates the use of PL/SQL with bound parameters...
参数化游标无法引用局部变量。在此示例中,cursor_id 必须用于 SELECT 语句中,原因是 in_id 没有在游标的作用域内。 CREATE OR REPLACE PROCEDURE myproc (in_id IN NUMBER) IS CURSOR c(cursor_id in NUMBER) IS SELECT id,emp_name FROM employee WHERE id = cursor_id; empName VARCHAR2(100); BEGIN...