| deva |
Posted: Jan 16, 2008 01:09:47 AM |
Total Post: 4
Joined: Jan, 2008
|
| raise_application_error terminate the procedure or continue from the next statement. |
|
|
Babu |
| Posted: Jan 16, 2008 04:04:16 AM | |
|
Total Post: 94
Joined: Oct, 2007
|
|
|
|
|
Nehru |
| Posted: Jan 17, 2008 12:05:47 AM | |
|
Total Post: 46
Joined: Jul, 2007
|
HI,
RAISE_APPLICATION_ERROR will terminate the procedure execution.
see the sample procedure here try this:
CREATE OR REPLACE PROCEDURE RAISEAPPERR
AS
VNAME VARCHAR2(30);
BEGIN
SELECT ENAME INTO VNAME FROM EMP WHERE EMPNO = 7839;
IF VNAME = 'KING' THEN
RAISE_APPLICATION_ERROR(-20036,'INVALID STATEMENT');
END IF;
SELECT ENAME INTO VNAME FROM EMP WHERE EMPNO = 7369;
DBMS_OUTPUT.PUT_LINE(VNAME);
END;
/
Once the RAISE_APPLICATION_ERROR fire then the procedure terminates.
Any one let me know if am wrong.
Take Care.
Thanks,
Nehru.
|
|
|
|
|
shwetamber |
| Posted: Jan 18, 2008 06:12:54 AM | |
|
Total Post: 2
Joined: Sep, 2005
|
well
raise_application_error will not terminate the procedure.
to some extent it acts as RAISE exception_name.
As any of the two statements written above are encountered,an exception is raised. the advantage with raise statement is we can have an exception handler for exception_name. but when when an exception is raised using raise_application_error it can only be catered by when others handler.
|
|
|
|
|
Garlapati |
| Posted: Feb 04, 2008 06:11:44 AM | |
|
Total Post: 30
Joined: Apr, 2007
|
yes Raise_application_error will terminate the procedure execution
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |