Summary
The main points we learned in this chapter are:
You can return multiple rows
You can return multiple rows of complex data, similar to a
SELECT
queryYou can return several sets of tables and have them possibly evaluated in a lazy manner by using refcursors
You can return data as complex as you want using either XML or JSON
So there really are very few reasons for not using database functions as your main interaction mechanism with the database. In the next chapter, we will learn how to call functions when different types of events occur in the database.