© Kim Berg Hansen 2020
K. Berg HansenPractical Oracle SQLhttps://doi.org/10.1007/978-1-4842-5617-6_5

5. Functions Defined Within SQL

Kim Berg Hansen1 
(1)
Middelfart, Denmark
 

One of the beauties of the SQL language in Oracle is that it can so easily be extended by writing functions that SQL can call. Typically in PL/SQL, but for special cases, it might also be in C or in Java. With the new multilingual engine, it’ll be possible in future versions to write stored procedures and functions in multiple languages.

But the thing to note is that SQL and PL/SQL are executed by two different engines, each with small differences, for example, how variables, datatypes, and memory are handled. Every time SQL calls a PL/SQL function, or vice versa PL/SQL executes ...

Get Practical Oracle SQL: Mastering the Full Power of Oracle Database now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.