databases Online Quiz - 173
Description: databases Online Quiz - 173 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: databases |
Implicit cursors are declared for
Which is the procedure used to issue User-Defined error messages from stored Sub-Programs?
How do you handle an Exception?
Examine this procedure: CREATE OR REPLACE PROCEDURE DELETE_PLAYER(V_IDIN NUMBER) IS BEGIN DELETE FROM PLAYER WHERE ID = V_ID EXCEPTION WHEN STATS_EXIST_EXCEPTION THEN DBMS_OUTPUT.PUT_LINE(Cannotdeletethisplayer, childrecordsexistin PLAYER_BAT_STAT table); END; What prevents this procedure from being created successfully?
Under which two circumstances do you design database triggers? (Choose two)
Which two statements about packages are true? (Choose two)
A function must return zero or more values to its calling environment, whereas a procedure returns a value to the calling environment.
Which of the following statements is false with respect to packages?
Identifiers defined only in the package body are public constructs. These are visible outside the package body
Private constructs in the package body are hidden and inaccessible.This is an advantage of a package
This statement fails when executed: CREATE OR REPLACE TRI GGER CALC_TEAM_AVG AFTER I NSERT ON PLAYER BEGIN INSERT INTO PLAYER_BATSTAT ( PLAYER_I D, SEASON_YEAR, AT_BATS, HI TS) VALUES ( : NEW. I D, 1 997, 0, 0) ; END; To which type must you convert the trigger to correct the error?
Which two program declarations are correct for a stored program unit? (Choose two)
What is true about stored procedures?
Examine this code: CREATE OR REPLACE FUNCTION gen_email_name (p_first_name VARCHAR2, p_last_name VARCHAR2, p_id NUMBER) RETURN VARCHAR2 IS v_email_name VARCHAR2(19); BEGIN v_email_name := SUBSTR(p_first_name, 1, 1) || SUBSTR(p_last_name, 1, 7) || [email protected] .; UPDATE employees SET email = v_email_name WHERE employee_id = p_id; RETURN v_email_name; END; Examine this code: CREATE OR REPLACE PACKAGE comm_package IS g_comm NUMBER := 10; PROCEDURE reset_comm(p_comm IN NUMBER); END comm_package; / User Jones executes the following code at 9:01am: EXECUTE comm_package.g_comm := 15 User Smith executes the following code at 9:05am: EXECUTE comm_paclage.g_comm := 20 Which statement is true?
Which three are valid ways to minimize dependency failure? (Choose three)
Which two describe a stored procedure? (Choose two)
A CALL statement inside the trigger body enables you to call ______.