Sequence in PL/SQL [message #372955] |
Tue, 20 March 2001 00:30 |
Arjun V
Messages: 14 Registered: March 2001
|
Junior Member |
|
|
I hv simple sequence:-
sql>create sequence s1
start with 1
increment by 1
nocache;
when i give command in SQL*Plus i get the output
sql> select s1.nextval from dual;
1
till this it is ok
when i m using in the application like below i m getting the error
sql> DECLARE
V_NO NUMBER;
BEGIN
SELECT S10.NEXTVAL INTO V_NO FROM DUAL;
DBMS_OUTPUT.PUT_LINE(V_NO);
END;
DECLARE
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 4
---
please help me solve the above problem.
thanks in advance..
Arjun V.
|
|
|
|