Session

SQL Macro or PL/SQL Function? Do I care? Can I let the transpiler deal with it?

For decades it's been good practice not to repeat identical code all over. In SQL the normal way to achieve this has always been to write a PL/SQL function and call it from your SQL statements.

Is this always a good idea? Do we have alternatives now? Yes, you can for example use SQL macros to let your reusable code become a part of your SQL, avoiding the impact of using PL/SQL.

But do you have to worry about when it's possible to use a macro instead of a function? Not always. The SQL transpiler in Oracle Database 23ai can detect possibilities of embedding your function code in SQL like a macro.

Learn about the issues with function calls from SQL and the pros and cons of alleviating these with SQL macros and/or SQL transpiler.


Co-presentation with Chris Saxon.
Presented at:
- POUG 2025

Kim Berg Hansen

Lead Developer, Cegal Danmark A/S

Middelfart, Denmark

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top