Oracle不斷給我發出此錯誤:ORA-30625:方法調度爲NULL SELF參數不允許。PL/SQL ORA-30625:方法調度爲NULL SELF參數不允許
ORA-30625:對NULL SELF參數方法分派是不允許
的代碼如下:直到您構造函數調用創建
CREATE OR REPLACE TYPE PEDIDO_TP AS OBJECT(
ID_PEDIDO NUMBER,
DATA_PAGAMENTO DATE,
CANCELADO NUMBER(1),
PENDURADO NUMBER(1),
member procedure cancelapedido(n in number)
);
create or replace type body PEDIDO_TP as
member procedure
cancelapedido(n in number) is
begin
DELETE FROM PEDIDO p
WHERE p.ID_PEDIDO = n;
end;
end;
CREATE TABLE PEDIDO OF PEDIDO_TP(
ID_PEDIDO PRIMARY KEY
);
insert into PEDIDO values (PEDIDO_TP(1,'12/12/12',0,0));
declare
x PEDIDO_TP;
begin
x.cancelapedido('1');
end;<code>
可能重複成員過程NULL SELF參數Oracle](http://stackoverflow.com/questions/2319022/calling-member-procedure-null-self-argument-oracle) – user272735