PL/SQL tutorial 49: Declare user define exception using PRAGMA EXCEPTION_INIT in Oracle Database

preview_player
Показать описание
------------------------------------------------------------------------
►►►LINKS◄◄◄

Previous Tutorial
► User-Define Exception using RAISE_APPLICATION_ERROR

-------------------------------------------------------------------------
►Make sure you SUBSCRIBE and be the 1st one to see my videos!
-------------------------------------------------------------------------
►►►Find me on Social Media◄◄◄
Follow What I am up to as it happens on

___Facebook Official Page___

You can also Email me at
for E-mail address please check the About section

Please please LIKE and SHARE my videos it makes me happy.
Thanks for liking, commenting, sharing and watching more of our videos

♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Рекомендации по теме
Комментарии
Автор

set serveroutput on;
accept var_age number prompt 'What is your age';
declare
ex_age exception;
age number := &var_age;
pragma exception_init(ex_age, -20008);
begin
if age < 18 then
raise_application_error(-20008, 'You should be 18 or above for the drinks!');
end if;

would you like to have?');

exception when ex_age then

end;
/

stjepanmudronja
Автор

Thanks Manish.. Your tutorial videos made PL/SQL easy to me.. keep it up.. my best wishes to you :)

NehaJain-rysr
Автор

exception handling done. AWESOME AWESOME AWESOME

SuvradipDasPhotographyOfficial
Автор

if we change error number in raise_application_error then how oracle will find the error it has to handle is the one we created using pragma exception_Init ?

anujrana
Автор

Thanks a lot for this video. A very big confusion of mine got cleared.👍

AnkurSharma-ozdp
Автор

Can you make a video on Oracle Interface data transfer Process..

trusharpatel
Автор

Your videos helps me alot. Thank you manish

ankammareddybhavanam
Автор

Why we in EXCEPTION set 'WHEN ex_age'? Better is to set 'WHEN OTHERS' because that works for all, and 'WHEN ex_age' works only for 'ex_age'

NPC_YOUTUBE_USER
Автор

Sir in this same program im getting illegal no of arguments for pragma exception_init plzz help ! Thnks !!

shaheenshaikh
Автор

accept myAge number prompt 'what is my age?';
declare
ex_age Exception;
age number := &myAge;
pragma exception_init (ex_age, -20008);
begin
if age <18 then
raise_application_error(-20008, 'below 18');
end if;

dbms_output.put_line('you are good.');

exception when ex_age then


end;
/

dhpratik
Автор

hi sir, you are doing a great job. really your tutorials are helping me alot. if possible, can you please make tutorials on forms and reports.. thanq very much boss..

sivakrishna
Автор

Accept var_age number prompt "enter age";
Declare
Age:=&var_age;
Ex_exp exception ;
Pragma exception_init(ex_exp, -2009);
Begin
If age<18 then
...
End if;
Exception when ex_exp then
Dbms..
End;
/

divyadevaraj
Автор

Sir why its -20008 means how to took this no

shaheenshaikh
Автор

Sir whts the range of error codes for pragma exception_init function

shaheenshaikh
Автор

Please remove the music.its a kind of disturbance to learn ..

azmalkhan
Автор

Accept uservariable datatype prompt usercustompromptmessage

Vasanthvdevskp