Preamble
The GOTO statement calls for code to go to the tag after the GOTO statement.
The syntax for the GOTO statement in Oracle / PLSQL consists of two parts – GOTO statement and LABEL_NAME (transition labels)
The GOTO statement consists of the keyword Goto, followed by LABEL_NAME.
GOTO label_name;
LABEL_NAME
A transition label consists of LABEL_NAME enclosed in << >>, and at least one operator to execute.
<<label_name>>
{...}
- LABEL_NAME must be unique within the code in Oracle / PLSQL.
- It must have at least one operator to be executed after the transition label.
Example:
CREATE OR REPLACE Function FindCourse
( name_in IN varchar2 )
RETURN number
IS
cnumber number;
CURSOR c1
IS
SELECT MAX(course_number)
FROM courses_tbl
WHERE course_name = name_in;
BEGIN
open c1;
fetch c1 into cnumber;
IF c1%notfound then
GOTO default_number;
ELSE .
GOTO increment_number;
END IF;
<<default_number>>
cnumber := 0;
<<increment_number>>
cnumber := cnumber + 1;
close c1;
RETURN cnumber;
END;
PL/SQL; GOTO statement
About Enteros
Enteros offers a patented database performance management SaaS platform. It proactively identifies root causes of complex business-impacting database scalability and performance issues across a growing number of clouds, RDBMS, NoSQL, and machine learning database platforms.
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
How to Achieve Intelligent Budgeting with Enteros Cloud Bill Analytics and AI SQL
- 15 May 2026
- Database Performance Management
Introduction As organizations continue accelerating digital transformation initiatives, cloud adoption has become essential for supporting scalability, agility, and innovation. Enterprises across industries now rely on cloud-native applications, distributed infrastructures, data analytics platforms, and AI-driven services to power modern operations. However, while cloud environments provide flexibility and scalability, they also introduce significant financial and operational complexity. … Continue reading “How to Achieve Intelligent Budgeting with Enteros Cloud Bill Analytics and AI SQL”
How to Improve Banking System Reliability with Enteros Database Software and AI SQL Analytics
Introduction The banking industry is experiencing rapid digital transformation driven by mobile banking, cloud-native platforms, real-time payment systems, and AI-powered financial services. Customers now expect seamless digital experiences, instant transactions, and uninterrupted banking services across every channel. As banks modernize their operations, maintaining system reliability has become more critical than ever. A single outage, slow … Continue reading “How to Improve Banking System Reliability with Enteros Database Software and AI SQL Analytics”
Enhancing Database Performance and Scalability in Digital Banking Platforms with Advanced Analytics
- 14 May 2026
- Database Performance Management
Introduction Digital banking has transformed the financial services landscape. Customers now expect seamless mobile banking experiences, instant payments, real-time transaction confirmations, and 24/7 service availability. These modern banking services rely heavily on high-performance database infrastructures that support massive transaction volumes and complex analytics workloads. At the core of every digital banking interaction—whether it is a … Continue reading “Enhancing Database Performance and Scalability in Digital Banking Platforms with Advanced Analytics”
How Intelligent Database Analytics Improves Performance and Reliability in Modern E-Learning Platforms
Introduction The global shift toward digital education has transformed how institutions deliver learning experiences. Universities, online learning platforms, corporate training systems, and educational technology companies now rely heavily on digital platforms to deliver courses, manage learning data, and support millions of simultaneous users. Behind every online lecture, virtual classroom, exam submission, and learning analytics dashboard … Continue reading “How Intelligent Database Analytics Improves Performance and Reliability in Modern E-Learning Platforms”