How do you handle exceptions. Give the syntax for it?
Answer Posted / guest
declare
khali exception;
a number(8);
b number(8);
begin
select count(*) into b from &table_name;
dbms_output.put_line('value of b is '||b);
if b = 0 then
raise khali;
end if;
exception
when khali then
dbms_output.put_line('are ye table to khali
nikali');
when others then
select NUM into a from furzi2;
dbms_output.put_line('Others');
end;
/
Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
What is the usage of when clause in trigger?
Is it possible to pass parameters to triggers?
Differentiate between % rowtype and type record.
What are the types of records?
Why do we need databases?
Where can I learn sql for free?
What is pl/sql table? Why is it used?
What is %type in pl sql?
How to use distinct and count in sql query? Explain
What is the use of index in hive?
How to move files from one directory to another in pl sql?
how to create a new table in mysql? : Sql dba
what is 'mysqlcheck'? : Sql dba
What is procedure explain with program?
What is procedure and function?