Home » RDBMS Server » Server Administration » Re: What is use of 'raise' command in pl/sql
Re: What is use of 'raise' command in pl/sql [message #374256] Sun, 03 June 2001 02:39 Go to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
Hi,
you can use raise statement to raise user defined exceptions

Ex:
Declare
ex exception;
begin

if ...

raise ex;
end if;

exception
if ex then
....

end if;
end;

Suresh
Re: What is use of 'raise' command in pl/sql [message #374266 is a reply to message #374256] Mon, 04 June 2001 01:15 Go to previous messageGo to next message
Rajee
Messages: 17
Registered: June 2001
Junior Member
Hi,
Sorry. I am not asking about raising user-defined exceptions. What i trying to ask is 'We can use raise command within the exception block itself without giving any exception names.
Example:

Begin
...
raise exp;
...
exception
when exp then
dbms_output.put_line('Invalid data');
raise;
end;

Regards,
rajee
Re: What is use of 'raise' command in pl/sql [message #374267 is a reply to message #374266] Mon, 04 June 2001 01:21 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
it will reraise that same exception.
Re: What is use of 'raise' command in pl/sql [message #374273 is a reply to message #374266] Mon, 04 June 2001 02:20 Go to previous messageGo to next message
Rajee
Messages: 17
Registered: June 2001
Junior Member
Hi,
If 'raise' command in exception block re-raise the exception, what is the use of it.
Re: What is use of 'raise' command in pl/sql [message #374274 is a reply to message #374266] Mon, 04 June 2001 02:28 Go to previous message
Rajee
Messages: 17
Registered: June 2001
Junior Member
Hi,
If 'raise' command in exception block re-raise the exception, what is the use of it.
Previous Topic: Re: Sending mail in PL/SQL.
Next Topic: Re: difference between oracle 7 and oracle 8
Goto Forum:
  


Current Time: Thu Jul 04 03:14:55 CDT 2024