Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
2Activity
0 of .
Results for:
No results containing your search query
P. 1
PL/SQL Practice Quizzes Exam 2

PL/SQL Practice Quizzes Exam 2

Ratings: (0)|Views: 241 |Likes:
Published by meachamrob
Practice Quizzes Exam 2
Practice Quizzes Exam 2

More info:

Categories:Types, School Work
Published by: meachamrob on May 01, 2013
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

10/03/2013

pdf

text

original

 
Practice Quizes #4
Question 1 2.5 out of 2.5 points A(n) ____ is a mechanism to trap an error that occurs in processing. Answer
Selected Answer: c. Exception handler
Question 2 2.5 out of 2.5 pointsThe ____ is an Oracle built-in procedure that allows developers to associate their own error numberand message to an error. Answer
Selected Answer: c. RAISE_APPLICATION_ERROR  
Question 3 2.5 out of 2.5 points ____ is used to trap errors not specifically addressed in one of the exception handlers. Answer
Selected Answer: c. WHEN OTHERS
Question 4 2.5 out of 2.5 points Analyze the cursor declaration below. Which of the followings is the correct answer to explain thepurpose of this cursor?CURSOR c_dept_cursor ISSELECT department_id,department_nameFROM departments WHERE department_id < 100ORDER BY department_id; Answer
Selected Answer: c. To retrieve department_id, and department_name for thosedepartments with department_id less than 100 and process the records in the order by the department_id.
Question 5 2.5 out of 2.5 points A(n) ____ represents a work area or section of memory in which an SQL statement is beingprocessed in the Oracle server. Answer
Selected Answer: c. cursor
Question 6 2.5 out of 2.5 pointsThe ____ action used in an explicit cursor processes the query and creates an active set of rowsavailable in the cursor. Answer
Selected Answer: b. OPEN
Question 7 2.5 out of 2.5 points ____ is required in a PRAGMA EXCEPTION_INIT statement. Answer
 
Selected Answer: b. Exception name
Question 8 2.5 out of 2.5 points ____ is an acceptable error number for the RAISE_APPLICATION_ERROR function. Answer
Selected Answer: c. -20002
Question 9 2.5 out of 2.5 points Which of the following functions returns the Oracle error message in exception handling? Answer
 Selected Answer: b. SQLERRM
Question 10 2.5 out of 2.5 points ____ refers to a condition where there is no WHEN clause in the CASE statement. Answer
Selected Answer: a. CASE_NOT_FOUND
Practice Quiz #5
Question 1 2.5 out of 2.5 pointsTo reference a host variable in PL/SQL, a preceding ____ must be used with the host variable name. Answer
Selected Answer: a. colon
Question 2 2.5 out of 2.5 pointsIf no mode is indicated in a parameter, the default value of ______________ is applied. Answer
Selected Answer: c. IN
Question 3 2.5 out of 2.5 points Which of the following statements is true? Answer
Selected Answer: a. If an exception is raised in procedure B that has been called fromprocedure A, the control initially moves to the exception handler section of procedureB. 
Question 4 2.5 out of 2.5 points _____________ indicate which way the value provided for the parameter flows: into the procedure,out of the procedure, or both. Answer
Selected Answer: c. Modes
Question 5 2.5 out of 2.5 points ____ a program unit or PL/SQL block of code allows the storage and reuse of the code.
 
 Answer
Selected Answer: a. Naming
Question 6 2.5 out of 2.5 points A parameter with a(n) ____ only mode can receive a value, but this value cannot be changed in theprocedure. Answer
Selected Answer: b. IN
Question 7 2.5 out of 2.5 pointsExamine the following procedure.CREATE OR REPLACE PROCEDURE INSERT_TEAM(V_ID in NUMBER, V_CITY in VARCHAR2 DEFAULT 'AUSTIN', V_NAME in VARCHAR2)ISBEGININSERT INTO TEAM (id, city, name) VALUES (v_id, v_city, v_name);COMMIT;END;/ Which of the following statements will successfully invoke this procedure in SQL*Plus? Answer
Selected Answer: b. EXECUTE INSERT_TEAM(3,'AUSTIN','LONGHORNS');
Question 8 2.5 out of 2.5 pointsIf values are calculated or retrieved from the database within the procedure, ____ parameters areused to return these values to the calling environment. Answer
Selected Answer: b. OUT 
Question 9 2.5 out of 2.5 points ____ can accept and return none, one, or many parameters. Answer
Selected Answer: b. Stored procedures 
Question 10 2.5 out of 2.5 pointsThe following example is for _______________.EXECUTE add_department (p_loc=>1500, p_name=>'INFORMATION TECHNOLOGY'); Answer
Selected Answer: b. passing parameters using the named notation
Practice Quiz #6
Question 1 2.5 out of 2.5 pointsBased on the package specification below, which of the following code fragments correctly creates apackage body?CREATE OR REPLACE PACKAGE ordering_pkg

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->