UrbanPro
true

Learn Database Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Starter on exception handling

Gavi Y.
28/12/2016 0 0

Just run these two blocks individually, observe the output and comment on what do you understand from it.

SET SERVEROUTPUT ON
Declare
Cursor C is select * from emp;
i c%rowtype;
Begin
Fetch C into i;
End;

SET SERVEROUTPUT ON
Declare
Cursor C is select * from emp;
i c%rowtype;
Begin
Fetch C into i;
Exception
WHen others Then
DBMS_OUTPUT.put_line('Error MSG: '||Substr(SQLERRM,1,30)||' And Error Code: '||SQLCODE);
End;

And lastly, focus on this statement in the output- 'PL/SQL procedure successfully completed.'

 

0 Dislike
Follow 0

Please Enter a comment

Submit

Other Lessons for You

DBMS - SQL - Any/All
All - Operator SELECT empno, sal FROM emp WHERE sal > ALL (1999, 2999, 3999); Output of Above query is same as below query SELECT empno, sal FROM emp WHERE sal > 1999 AND sal > 2999...

Radhe Shyam

0 0
0

What is PowerPoint?
PowerPoint is a complete presentation graphics package. It gives you everything you need to produce a professional-looking presentation. PowerPoint offers word processing, outlining, drawing, graphing,...

Pl SQL Cursors
To process an SQL statement, ORACLE needs to create an area of memory known as the context area; this will have the information needed to process the statement. This information includes the number...

How To Return a Result Set from a Stored Procedure
One of the easiest ways to tackle such Real Time scenarios is through use of Oracle Defined "SYS_REFCURSOR" or "REF CURSOR". We can create a Procedure with an out parameter of Type SYS_REFCURSOR and in...
S

An Introduction to Business Intelligence Concepts
Looking for a Business Intelligence (BI) solution for your company can be intimidating. BI uses its own special terminology and the database design concepts can be difficult to grasp. So where do you...
X

Looking for Database Training Classes?

The best tutors for Database Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Database Training with the Best Tutors

The best Tutors for Database Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more