PL/SQL provides three different types of collections to hold multiple items of data. They all come with different capabilities and limitations and since these are hard to remember, I provide a condensed showcase of the different collection types in one single code example.
Recursive CTEs (WITH-clause) is one addition to the SQL standard that makes the language incredibly powerful. Besides other things it can be used to generate data rows “from thin air” – for example a list of quarters by year.
SQL is your friend!
One of my favorite features of (Oracle-)SQL is how easy it is to turn relational data into other data formats like JSON or XML.
But what if you need to add a namespace to some of the nodes in your generated XML?
I struggled with that until I made a realization about the nature of the xlmns part in XML.