2014-11-09 2 views
-1

괜찮습니다. 수업에서이 코드를 복사했지만, 실제로 작동하지 않기 때문에 나는 잠 들어 있었을 것입니다.SQLPLUS이 절차를 올바르게 수정하려면 어떻게합니까?

Create or replace procedure display_row is 
    (p_itemid IN item.itemid%TYPE) is 
    v_itemid Number; 
    v_itemdesc varchar2(30); 
    v_category varchar2(30); 
Begin 
    Select * 
    Into v_itemid, v_itemdesc, v_category 
    From item 
    Where itemid = p_itemid; 
    Dbms_output.put_line(v_itemid || ' ' || v_itemdesc || ' ' || v_category); 
End; 

실제로이 절차를 수정하여 어떻게 작동합니까? 여기

는 사용자 오류입니다 : 첫 문장에서 is 연산자를 제거

LINE POSITION TEXT 

 2   6 PLS-00103: Encountered the symbol "(" when expecting one of 
        the following: 

        begin function package pragma procedure subtype type use 
        <an identifier> <a double-quoted delimited-identifier> fo 
        rm 
        current cursor external language 

    2   37 PLS-00103: Encountered the symbol "IS" when expecting one of 
        the following: 

        return 

답변

1

Create or replace procedure display_row is 
             <--Here  

프로 시저가

Create or replace procedure display_row 
    (p_itemid IN item.itemid%TYPE) is 
    v_itemid Number; 
    v_itemdesc varchar2(30); 
    v_idemdesc varchar2(30); 
Begin 
    Select * 
    Into v_itemid, v_itemdesc, v_category 
    From item 
    Where itemid = p_itemid; 
    Dbms_output.put_line(v_itemid || ' ' || v_itemdesc || ' ' || v_category); 
End; 
과 같아야합니다
+0

Excellent, 정말 고마워요! 나는 그것을 놓치기에 어리석은 느낌이 들지 만, 이제는 상황이 훨씬 더 의미가 있음을 알게되었습니다. – user2022185

관련 문제