I can’t remember using the PL/SQL construct where current of in code I have written so along with my usual article style of how use to use this feature, this is also an experiment to find out if there are any other reasons to use where current of. The code […]
Estimated reading time: 4 minutes
Since dbms_utility.format_error_backtrace has been available from Oracle 10g this isn’t another what it ishow to use it post. Instead I will be taking this opportunity to discuss a nuance of dbms_utility.format_error_backtrace that you may not be aware of. dbms_utility.format_error_backtrace reports the call stack back to the exception or the last […]
Estimated reading time: 4 minutes
One of the popular exercises when learning a new language is to develop a FizzBuzz program. This is where you print out the all the numbers from 1 to 100 except if a number is a multiple of 3 you print out Fizz and if the number is a multiple […]
Estimated reading time: 1 minute
I was recently working through Chapter 9 of the 12c Database 2 Day Developer’s Guide and found the following bug in the sample code. Here is the original code: FUNCTION add_department ( p_department_name IN departments.department_name%TYPE, p_manager_id IN departments.manager_id%TYPE ) RETURN departments.department_id%TYPE IS l_department_id departments.department_id%TYPE; BEGIN INSERT INTO departments ( department_id, department_name, […]
Estimated reading time: 3 minutes
Introduced in Oracle Database 11.1 The PL/SQL CONTINUE statement allows you to skip the current loop iteration. It can be used conditionally and unconditionally. Unconditional Example BEGIN FOR i IN 1 .. 10 LOOP IF i = 2 THEN CONTINUE; END IF; DBMS_OUTPUT.PUT(i || ‘, ‘); END LOOP; DBMS_OUTPUT.NEW_LINE; END; In […]
Estimated reading time: 1 minute