Monday, December 17, 2018

What is Pragma EXECPTION_INIT? Explain the usage?

Pragma exception_init Allows you to handle the Oracle predefined message with your own message. This means you can instruct the compiler to associate the specific message to the oracle's predefined message at compile time. This way you improve the readability of your program and handle it according to your own way.

It should be declared in the DECLARE section.

declare
salary number;
FOUND_NOTHING exception;
Pragma exception_init(FOUND_NOTHING ,100);
begin
select sal into salary from emp where ename =' ANURAG';
dbms_output.put_line(salary);
exception
WHEN FOUND_NOTHING THEN
dbms_output.put_line(SQLERRM);
end;

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

How many Types of Exceptions in Oracle PL/SQL

There are 2 types of exceptions. They are
a) System Exceptions
E.g. When no_data_found, When too_many_rows

b) User-Defined Exceptions
E.g. My_exception exception
When My_exception then

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Difference between NO DATA FOUND and %NOTFOUND?

NO DATA FOUND is an exception raised only for the SELECT...INTO statements when the where clause of the query does not match any rows. When the where clause of the explicit cursor does not match any rows the %NOTFOUND attribute is set to TRUE instead.

If the where clause of an update or delete statement does not match any rows, SQL%NOTFOUND is set to TRUE, rather than raising NO_DATA_FOUND. Because of this, all of the fetch loops are shown so use %NOTFOUND or %FOUND to determine the exits condition for the loop, rather than NO_DATA_FOUND EXCEPTION.

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

What is Difference Between UNION and UNION ALL

UNION will return the distinct value
UNION ALL will return the duplicate value.

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

Oracle Application R12 XML Publisher Base Tables

Affected Base tables for Data Definitions are
xdo_ds_definitions_b
xdo_ds_definitions_tl


Affected Base tables for Templates are
xdo_templates_b
xdo_templates_tl
xdo_lobs

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.