Multiple choice technology databases

CREATE PROCEDURE testproc( IN i1 INT, INOUT i3 INT) SPECIFIC testproc BEGIN SET i3 = i1; END @ CREATE PROCEDURE testproc( IN i1 INT, INOUT i2 INT, INOUT i3 INT) SPECIFIC testp BEGIN SET i3 = i1 * i2; END @ Given that the statements in the exhibits have executed successfully, which solution contains the complete set of commands that could be used to drop both procedures in the order presented?

  1. DROP PROCEDURE testp; DROP PROCEDURE testp;

  2. DROP PROCEDURE testp; DROP PROCEDURE testproc;

  3. DROP SPECIFIC PROCEDURE testproc; DROP PROCEDURE testproc;

  4. DROP PROCEDURE testproc(INT); DROP PROCEDURE testproc(INT);

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Two procedures are created with the same NAME (testproc) but different SPECIFIC names (testproc and testp). To drop them unambiguously, you must use the SPECIFIC identifier. Option C uses DROP SPECIFIC PROCEDURE testproc (drops first by specific name) followed by DROP PROCEDURE testproc (drops second by regular name since no other procedure named testproc exists after first drop). Options A and B reference non-existent specific name 'testp' without SPECIFIC keyword. Option D uses incorrect syntax with parameter types.