How do you handle exceptions. Give the syntax for it?
Answer / 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 |
What is the difference between delete and truncate commands?
How do you declare a user-defined exception?
What are Lexical Parameters.How They are used in Reports 6i
What is a delimiter in sas?
What is difference between primary and secondary key?
What information is needed to connect sql*plus an oracle server?
What is rank dense_rank and partition in sql?
how to drop an existing view in mysql? : Sql dba
List out the acid properties and explain?
Why stored procedures are faster than query?
Can we write ddl statements in functions?
How to handle bulk data?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)