學習一下明確的遊標,並試圖創建我FRST一個:哪些錯誤與此光標
SET SERVEROUTPUT ON
DECLARE
v_ename EMP.FIRST_NAME%TYPE;
v_salary EMP.SALARY%TYPE;
CURSOR c_emp IS SELECT first_name, salary FROM emp;
BEGIN
OPEN c_emp;
FETCH c_emp INTO v_ename, v_salary;
DBMS_OUTPUT.PUT_LINE('Employee Details ' || v_ename || ' ' || v_salary)
FETCH c_emp INTO v_ename, v_salary;
DBMS_OUTPUT.PUT_LINE('Employee Details ' || v_ename || ' ' || v_salary)
CLOSE c_emp;
END;
,但它給了我:
FETCH c_emp INTO v_ename, v_salary;
*
ERROR at line 10:
ORA-06550: line 10, column 3:
PLS-00103: Encountered the symbol "FETCH" when expecting one of the following:
:= . (% ;
The symbol ";" was substituted for "FETCH" to continue.
ORA-06550: line 13, column 3:
PLS-00103: Encountered the symbol "CLOSE" when expecting one of the following:
:= . (% ;
任何想法?
嗯。您可以將其標記爲正確的答案,以便其他人知道該問題的解決方案:) – Kirtan 2009-06-15 05:43:09