Skip to main content

A new name - and amazing new future - for PL/SQL

Note: You might think that this was published on April 2nd, but in fact it was published on April 1st.

PL/SQL, the database programming language from Oracle, introduced in 1991 and used by millions over the years to implement data APIs and business logic in mission critical applications from which billions of humans benefit daily, is undergoing a radical transformation in order to stay relevant for, and meta-cool to, future generations of developers.

After a careful examination of all modern programming languages and the definitive StackOverflow developer surveys, the PL/SQL development team implemented a super-secret plan (yes, that’s correct, even the Distinguished Product Manager for PL/SQL, Bryn Llewellyn, is unaware of what you are about to read. So don’t bother him about it, OK?).

I am, therefore, inordinately pleased and honored to be the first to announce the following changes for PL/SQL in Oracle Database 20c:
  1. PL/SQL will now be a case-insensitive language. Sort of.
  2. Only lower-case letters will be supported.
  3. All keywords will now be encased within squiggly brackets. 
  4. The name of the language will change to {plsql}. 
  5. SQL statements are replaced by “yo, oracle!” commands.
  6. All procedures and functions are implemented as recursive callback functions executed asynchronously across all Oracle Database instances in all parallel universes available through the Oracle Quantum Universe Cloud Service.
Let’s take a look at how {plsql} differs from PL/SQL.

Here’s “Hello World” in PL/SQL 18c:

   DBMS_OUTPUT.PUT_LINE (‘Hello World’);

And now in {plsql}:

    {'Hello {dbms_output(.)put_line} World’)(call)(home)(et);

And you won’t recognize it, but you sure will be impressed by what’s happened to “select from dual”.

   l_dummy sys.dual.dummy%TYPE;
   SELECT dummy
     INTO l_dummy
     FROM sys.dual;

And now in {plsql}:

   l_dummy {yooracle}”What’s the type of dummy in dual?”;
   {yooracle}”What’s the value of dummy in dual?”:l_dummy;

For really complicated SQL statements, you might want to switch to the even more flexible and powerful MLC (“machine learning cloud”) mode, demonstrated so ably below:

   {ihaveadream}”What’s the running total for all orders placed 
                last month by customers located within a kilometer 
                of their parents?”
   => {oraclevrconsole};

I could go on and on and on and on and on and on and on and on and on and on (Seriously, I could. The Oracle Quantum Universe Cloud Service, while not available in April 2018,  is up and running in 2020. I am using it to spray tachyons backwards and forwards through time, thereby allowing  me to sign up for as many Oracle Public Cloud trials as I want and write this mind-boggling post).

I could even show you an example of a recursive callback function executed asynchronously across all Oracle Database instances in all parallel universes.

But I won’t. I like you too much.

2018 marks the 37th year I am have working with PL/SQL I am proud of the many achievements of Oracle Database developers over those years. And today, on April 1, 2018, I am confident of a “squiggly bright” future for {plsql} over the next 37 years.

Join me for the journey!


  1. Hello Steven,

    Please, I beg you, don't frighten us with that "callback functions executed asynchronously" feature, as those clever Node.js guys might even take it seriously :) ...

    Cheers and hope to still continue to travel together in the {PL/SQL} journey :)

    Best Regards,

  2. >> billions of humans benefit daily

    Which is even more impressive, taking into account, that it was developed by and for the inhabitants of Aldebaran system :-)

  3. Please dont frighten us with thee confusing notations. Please keep the language as itis.. But atleast u can enhance to include more features like python. thats it.

  4. Hi All ,

    I am a PL/SQL Developer with 4 year`s of experience working in an Insurance Domain Product based company.
    I have gained good knowledge on Insurance Domain and PL/SQL too.
    Kindly suggest me learning and choosing which technology for my next job would be good for my future in long run(As i am planning to get married soon).

    Best Regards,
    Ganesh Dasari.

    1. If you are planning to get married soon, I would suggest you learn the language of compromise. It's an old one that pre-dates modern computing, but is very pertinent to your future.

    2. Excellent idea, Martin!

      I also suggest checking out APEX - Oracle Application Express. Leverage those PL/SQL skills to build websites!


Post a Comment

Popular posts from this blog

Get rid of mutating table trigger errors with the compound trigger

When something mutates, it is changing. Something that is changing is hard to analyze and to quantify. A mutating table error (ORA-04091) occurs when a row-level trigger tries to examine or change a table that is already undergoing change (via an INSERT, UPDATE, or DELETE statement). In particular, this error occurs when a row-level trigger attempts to read or write the table from which the trigger was fired. Fortunately, the same restriction does not apply in statement-level triggers.

In this post, I demonstrate the kind of scenario that will result in an ORA-04091 errors. I then show the "traditional" solution, using a collection defined in a package. Then I demonstrate how to use the compound trigger, added in Oracle Database 11g Release1,  to solve the problem much more simply.

All the code shown in this example may be found in this LiveSQL script.

How to Get a Mutating Table Error

I need to implement this rule on my employees table:
Your new salary cannot be more than 25x th…

Table Functions, Part 1: Introduction and Exploration

Please do feel encouraged to read this and my other posts on table functions, but you will learn much more about table functions by taking my Get Started with PL/SQL Table Functions class at the Oracle Dev Gym. Videos, tutorials and quizzes - then print a certificate when you are done!

Table functions - functions that can be called in the FROM clause of a query from inside the TABLE operator - are fascinating and incredibly helpful constructs.

So I've decided to write a series of blog posts on them: how to build them, how to use them, issues you might run into.

Of course, I am not the first to do so. I encourage to check out the documentation, as well as excellent posts from Adrian Billington (search for "table functions") and Tim Hall. Adrian and Tim mostly focus on pipelined table functions, a specialized variant of table functions designed to improve performance and reduce PGA consumption. I will take a look at pipelined table functions in the latter part of this seri…

Quick Guide to User-Defined Types in Oracle PL/SQL

A Twitter follower recently asked for more information on user-defined types in the PL/SQL language, and I figured the best way to answer is to offer up this blog post.

PL/SQL is a strongly-typed language. Before you can work with a variable or constant, it must be declared with a type (yes, PL/SQL also supports lots of implicit conversions from one type to another, but still, everything must be declared with a type).

PL/SQL offers a wide array of pre-defined data types, both in the language natively (such as VARCHAR2, PLS_INTEGER, BOOLEAN, etc.) and in a variety of supplied packages (e.g., the NUMBER_TABLE collection type in the DBMS_SQL package).

Data types in PL/SQL can be scalars, such as strings and numbers, or composite (consisting of one or more scalars), such as record types, collection types and object types.

You can't really declare your own "user-defined" scalars, though you can define subtypes from those scalars, which can be very helpful from the perspective…