Multiple choice technology databases

Examine this code: CREATE OR REPLACE PRODECURE add_dept (p_dept_name VARCHAR2 DEFAULT 'placeholder', p_location VARCHAR2 DEFAULT 'Boston') IS BEGIN INSERT INTO departments VALUES (dept_id_seq.NEXTVAL, p_dept_name, p_location); END add_dept; / Which three are valid calls to the add_dep procedure ? (Choose three)

  1. add_dept;

  2. add_dept( .Accounting .);

  3. add_dept(, .New York .);

  4. add_dept(p_location=> .New York .);

Reveal answer Fill a bubble to check yourself
A,B,D Correct answer
Explanation

In PL/SQL, procedures with DEFAULT parameters can be called using those defaults. Option A uses both defaults. Option B provides the first parameter positionally, second uses default. Option C is invalid - you cannot skip a positional parameter with a comma (must use named notation). Option D uses named notation for the second parameter, first uses default. Named notation allows specifying parameters out of order or skipping earlier ones.