I published a PL/SQL puzzle on Twitter on November 6, 2019. I asked the following question:
Which lines of code can be removed (either entirely or in part) from the block below and not affect the output of the program in any way?
Tips, Expertise, Articles and Advice from the Pro's for Your Website or Blog to Succeed
I published a PL/SQL puzzle on Twitter on November 6, 2019. I asked the following question:
Which lines of code can be removed (either entirely or in part) from the block below and not affect the output of the program in any way?
There are special member methods — map or order methods — that we use to tell Oracle Database how to compare two objects of the same datatype. This capability is critical when we want to perform an equality test in PL/SQL or when sorting objects in SQL.
You may also like: Object-Oriented JavaScript
There is no default way to do this. In other words, if I create a simple object type, add it as a column to a table, and try to compare or sort, all I get are errors. Let's take a look. First I will create a table that has an object type as a column and add a couple of rows.
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 methods that only make sense in an object type, which supports inheritance and dynamic polymorphism.
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 defined in classes. In Oracle Database, we have object types.
In this post, I introduce you to the basics of object types and kick off a series exploring many of the features of these programming elements.
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 known as inquiry directives and referred to below as ccflags) used in $IF statements, and control which code will be included or excluded when compilation occurs.
3rd in a series on conditional compilation.
Do you write code that must run on more than one version of Oracle Database? This is almost always the case for suppliers of "off the shelf" applications. And when confronted with this reality, most developers choose between these two options: