What is pragma exception and how, when, where us
Answers were Sorted based on User's Feedback
Answer / shaik
Pragma Exception is a pre-compiled exception which is
particularly used to raise the user defined exceptions along
with the ORACLE error code.
PRAGMA EXCEPTION_INIT(exception_name, -Oracle_error_number);
ANY FURTHER CLARIFICATION CALL TO ME :09972372227
| Is This Answer Correct ? | 12 Yes | 2 No |
Answer / guru
The PRAGMA EXECPTION_INIT tells the complier to associate an
exception with an oracle error. To get an error message
of a specific oracle error.
e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error
number)
Example
declare
salary number;
FOUND_NOTHING exception;
Pragma exception_init(FOUND_NOTHING ,100);
begin
select sal in to salaryfrom emp where ename ='ANURAG';
dbms_output.put_line(salary);
exception
WHEN FOUND_NOTHING THEN
dbms_output.put_line(SQLERRM);
end;
| Is This Answer Correct ? | 10 Yes | 3 No |
Answer / guest
Its bad to see that Questions are not asked properly, and next is, people are not answering correctly, but no one is questioning them back.
Eg:- What is pragma exception and how, when, where us ...
Shaik --
Its not a Pre compiled exception, it is a Compiler Directive which has special meaning to this keyword.
Amit Kumar--
The Error range is from -20000 to -20999
Ramesh--
Your question is not clear.
eg:-How it compiler find?....
Guys Please be serious, as this is a good place to learn and share knowledge. Anyone who is really looking for interview questions will get wrong answers in their preparation
regards
j
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / amit kumar dwivedi
pragma is compiler directive and pragma exception_init is
used to associate user deifined name to error number(within
range of 20000-20999).
| Is This Answer Correct ? | 6 Yes | 6 No |
Answer / ramesh
How it compiler find. your answer will not fit my problem.
| Is This Answer Correct ? | 0 Yes | 5 No |
Explain what is sql*plus?
Can triggers stop a dml statement from executing on a table?
Can you skip header records while loading? : aql loader
What are the types of records?
What is composite data type in pl sql?
What are the basic sql commands?
How can multiply values of a column? OR How can multiply value of a row of a column using a single query in SQL?
Is record in oracle pl sql?
What is sql catalog?
how to calcuate the second highest salary of he employee
What is the difference between an inner join and an outer join?
How to call the function and Procedure in trigger?
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)