我正在嘗試爲Oracle的第一個存儲過程,因爲我之前的插入語句不工作。我收到了幾個小時在Google上搜索的這些奇怪的錯誤,似乎沒有人糾正我的具體問題。Oracle存儲過程運行錯誤
我只是希望能夠添加記錄:/
我的代碼如下:
CREATE OR REPLACE Insert_classifieds
(val_date IN TABLENAME.Addate%type,
val_category IN TABLENAME.Category%type,
val_user IN TABLENAME.Username%type,
val_ phone IN TABLENAME.Phonenbr%type,
val_email IN TABLENAME.Email%type,
val_shortDes IN TABLENAME.Description%type,
val_longDes IN TABLENAME.Fulldescription%type ,
val_newstandardid out TABLENAME.Classid%type
)
as num_standardid number;
begin
select t_class_seq.nextval into num_standardid from dual;
INSERT INTO TABLENAME (Classid, Addate, Category, Username, Phonenbr, Email, Description, Fulldescription)
VALUES (num_standardid, val_date, val_category, val_user, val_phone, val_email, val_shortDes, val_longDes);
commit;
val_newstandardid := num_standardid;
end;
谷歌搜索是值得欽佩的,但是當涉及到語法錯誤您的第一個停靠港應始終[Oracle文檔(http://docs.oracle.com/database/121/ LNPLS/create_procedure.htm#LNPLS01373) – APC