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.
One of the probably most unnerving things in databases is dealing with NULLs, especially when comparing data. The necessary logic to deal with NULLs can lead to very verbose code – but if you’re using Oracle, there is a very neat function you can use.
Sometimes we have data that is not split into columns and rows, but SQL can only really thrive on structured data.
But thanks to recursive queries we can split any string into rows – with pure SQL.
Automated self-tests are a fundamental part of application- and web-development
nowadays, even to the point where one can’t imagine modern software development
without them. Yet they are still surprisingly uncommon in the database.
This article shows how easy it is to start developing self-tests in Oracle with utPLSQL
version 3 and what benefits these tests will bring to your project
and your software.
Why are russian symbols printed as ? by a java-program that queries an Oracle database?
I came around this issue and thought it would be a good idea to write down my findings for future situations.