Quantcast
Channel: Obsessed with Oracle PL/SQL
Browsing all 312 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

One exception handler for all packaged subprograms?

This question was submitted as a comment in one of my videos today:Do we have to include an exception section for each individual subprogram or can we have a single handler for all subprograms?The...

View Article


Image may be NSFW.
Clik here to view.

Viewing conditionally compiled code: what will be run?

In the previous (first) post in my series on conditional compilation, I covered use cases and presented some simple examples.In this post, I show you how you can confirm what code is actually going to...

View Article


Image may be NSFW.
Clik here to view.

Nine Years at the Oracle Dev Gym

Waaaaay back in 2010, on April 8 to be specific, I started a website called the PL/SQL Challenge. It featured a daily PL/SQL quiz (yes, that's right - a new quiz every weekday!) and gave Oracle...

View Article

Image may be NSFW.
Clik here to view.

Writing code to support multiple versions of Oracle Database

3rd in a series on conditional compilation. See end of post for links to all posts in the series.Do you write code that must run on more than one version of Oracle Database? This is almost always the...

View Article

Image may be NSFW.
Clik here to view.

Setting and using your own conditional compilation flags

This post is the fourth in my series on conditional compilation. You will find links to the entire series at the bottom.In this post, I explore how to set and use conditional compilation flags (also...

View Article


Image may be NSFW.
Clik here to view.

Does the PL/SQL compiler remove code that is used?

Yes. No. Sort of. It's (not all that) complicated.This question hit my Twitter feed yesterday:When you enable all warnings, have you ever seen a "PLW-06006-- uncalled procedure removed" (lots of them),...

View Article

Use RETURNING Clause to Avoid Unnecessary SQL Statements

The RETURNING clause allows you to retrieve values of columns (and expressions based on columns) that were modified by an insert, delete or update. Without RETURNING you would have to run a SELECT...

View Article

Image may be NSFW.
Clik here to view.

How to make sure your code FAILS to compile

Huh, what?Make sure my code fails to compile?Why would I want to do that.Well, suppose that you had a compute-intensive procedure that ran every hour and benefited greatly from full PL/SQL compiler...

View Article


Image may be NSFW.
Clik here to view.

Make the Most of PL/SQL Bulk Processing

The bulk processing features of PL/SQL (BULK COLLECT and FORALL) are key tools for improving performance of programs that currently rely on row-by-row processing, an example of which is shown below.Use...

View Article


Image may be NSFW.
Clik here to view.

Best Type of Collection for FORALL?

I recently received this question in my In Box:Is FORALL faster with Associative Arrays or Nested Tables? Oracle 12.2 documentation says: "The most efficient way to pass collections to and from the...

View Article

Image may be NSFW.
Clik here to view.

When Lazy is Good: Overloading and APIs

When more than one subprogram (procedure or function) in the same scope share the same name, the subprograms are said to be overloaded. PL/SQL supports the overloading of procedures and functions in...

View Article

Image may be NSFW.
Clik here to view.

Some Curiosities of Oracle Error Codes

A blog post about Oracle error codes? Curiosities about them, even?If you doubt that this might be possible or of interest, then answer these two questions:Can an error in Oracle have more than one...

View Article

Image may be NSFW.
Clik here to view.

Use named notation for crystal clear code

The first and most important criteria of high quality code is that it meets user requirements (it's "correct").The second most important criteria is that it fast enough to meet user needs. It doesn't...

View Article


Image may be NSFW.
Clik here to view.

Change in ALL_ARGUMENTS as of 18c: no more composite "explosion"

The Oracle catalog contains hundreds of views (generally referred to as "data dictionary views") that provide information about the objects stored in the database (tables, views, PL/SQL program units,...

View Article

Image may be NSFW.
Clik here to view.

Feedback requested on upcoming changes to Dev Gym UI

Hello there, Dev Gym members!We plan to release a new version of the Dev Gym (19.3 - we are aligning with the overall version schema followed by Oracle Database and sister sites, like Oracle...

View Article


Image may be NSFW.
Clik here to view.

PL/SQL 101: Introduction to Object Types, a.k.a., Classes

PL/SQL is a procedural language - mostly. But it can also be used to implement object-oriented features in Oracle Database. In "from the ground up" object-oriented languages like Java, everything is...

View Article

A "SQL Guard" utility to help with SQL injection - available "AS IS"

I was asked the following question via a Twitter DM today:I stumbled upon a mention of "SQL Guard" and I was wondering what has become of it. Google confused me. Has it been published under some other...

View Article


The Ten Commandments of PL/SQL Development

A long, long time ago in a blog long ago lost to the shrouds and clouds of memory, I published a Ten Commandments of PL/SQL Development.A Twitter follower recently asked me for them, and lo and behold...

View Article

Image may be NSFW.
Clik here to view.

PL/SQL 101: Inheritance and Object Types

In my first post on object-oriented programming in PL/SQL, I introduced the object type (our version of a class) and showed how you needed to instantiate an object type instance before you could work...

View Article

Image may be NSFW.
Clik here to view.

Object Type Methods, Part 3

Packages have subprograms (procedures and functions). Object types have methods.Object type methods are, still, procedures and functions. But there are also different types and characteristics of...

View Article
Browsing all 312 articles
Browse latest View live