我已经为subj_code创建了类型,如下所示:
TYPE t_c_subj_code IS TABLE OF student.subj_code%TYPE INDEX BY PLS_INTEGER;
字段i_Subj_Code
包含subj_code
列表。我想选择不在subj_code
列表中的i_Subj_Code
我正在尝试以下程序:
Procedure GET_Test(i_P_No in varchar2,
i_Subj_Code IN t_c_subj_code,
o_cursor out t_cursor) is
BEGIN
OPEN o_cursor FOR
Select tt.c_subj_code
from student tt
where
tt.i_P_No =i_P_No and
tt.subj_code NOT IN
(SELECT COLUMN_VALUE FROM TABLE(i_Subj_Code));
END;