Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

DITABISS MIDT

HowNotToFail

QuestionAnswer
The FETCH statement positions the cursor pointer at the first row. FALSE
– The OPEN statement also positions the cursor pointer at the first row TRUE
The ___________ contains the exceptions handlers PL/SQL
Each exception handler is consists of a _____ clause, which specifies an exception name. WHEN
The exception section begins with the keyword _______. EXCEPTION
Error in PL/SQL is known as ____________ Exception
When an exception is raised, control immediately shifts to the _______ and the appropriate handler in the exception section is executed. Exception Section
The OTHERS is an optional exception-handling clause that traps any exceptions that have not been explicitly handled. TRUE
An exception handler for a particular exception must contain only one statement. TRUE
Each exception handler is consists of a WHEN clause, which specifies an exception name. TRUE
Exception section is mandatory in PL/SQL block TRUE
An exception occurs when an error is discovered during the execution of a program that disrupts the normal operation of the program. TRUE
There are 2 parameters needed in the pragma declaration of an exception. TRUE
The RAISE statement can be used to raise either user-defined or predefined exception TRUE
Non-predefined exceptions has a standard Oracle error number (ORA-#####) and error message, but not a predefined name. TRUE
Pragma declaration is used in declaring user-defined exceptions. FALSE
Non-predefined exceptions are similar to predefined exceptions, except they do not have predefined names TRUE
The RAISE statement can be used to raise either user-defined or non-predefined exception. FALSE
The ________ clause is used in user-defined exception to tell the compiler to associate an exception name with a specific Oracle error PRAGMA EXCEPTION_INIT
The RAISE_APPLICATION_ERROR can be used in: Executable and Exception section
The RAISE statement can be used to raise either ________ or predefined exception. USER-DEFINED
The oracle error number, at the PRAGMA EXCEPTION_INIT function, starts with _____. HYPEN
You can use the ________________ procedure to return user-defined error messages from stored subprograms. RAISE_APPLICATION_ERROR
The given syntax in declaring a user-define record is correct. TYPE type_name IS RECORD (field_declaration[,field_declaration]...); identifier type_name ; TRUE
If you omit the ______ keyword, then the Oracle server waits indefinitely until the rows are available. NOWAIT
If you omit the NOWAIT keyword, then the Oracle server waits indefinitely until the rows are available. TRUE
You must include the FOR UPDATE clause in the cursor query so that the rows are unlocked on OPEN FALSE
PL/SQL record is a _____ data type, you can refer to the whole record by its name and/or to individual fields by their names. Composite
The FETCH statement retrieves the rows from the cursor one at a time. TRUE
The OPEN statement positions the cursor pointer at the first row. TRUE
The term ________ in exceptions is the same as handling any error by including corresponding exception handler. TRAP
Handle named exceptions whenever possible, instead of using ______ in exception handlers OTHERS
Each exception handler is consists of a _____ clause, which specifies an exception name. WHEN
The term TRAP in exceptions is the same as handling any error by including corresponding exception handler TRUE
The RAISE keyword is used by non-predefined exception. FALSE
When code does not work as expected, PL/SQL raises an exception handler. TRUE
The term RAISE in exceptions is the same as handling any error by including corresponding exception handler. TRUE
Non-predefined errors are raised explicitly. FALSE
The __________ keyword is used in user-defined exception for error notification. EXCEPTION
The %ROWTYPE can be used to declare a record based on another record. TRUE
A block always terminates when PL/SQL raises an exception TRUE
In exception section, the WHEN clause if followed by _______. CONDITION
Code that defines the recovery actions to be performed when execution-time errors occur. EXCEPTION HANDLER
In explicit cursor operations, the set of rows returned by a multiple-row query is called RECORD SET FALSE
You must include the ________ clause in the cursor query so that the rows are locked on OPEN. FOR UPDATE
A user-defined PL/SQL record contains one or more fields of scalar data type. TRUE
PL/SQL record is a composite data type, you can refer to the whole record by its name and/or to individual fields by their names. TRUE
PL/SQL records contain one or more components/fields of any scalar or composite type TRUE
The ___________ and ___________ are the two types of Oracle Server Errors. Predefined, Non-predefined
Sample predefined exceptions: – NO_DATA_FOUND – TOO_MANY_ROWS – INVALID_CURSOR – ZERO_DIVIDE – DUP_VAL_ON_INDEX NO_DATA_FOUND
The RAISE_APPLICATION_ERROR can be used in executable and exception section. TRUE
You can use the EXCEPTION_INIT procedure to return user-defined error messages from stored subprograms. FALSE
The user-defined exceptions are declared within the declarative section and are raised implicitly. TRUE
The RAISE_APPLICATION_ERROR can be used in executable and exception section. TRUE
User-defined exceptions are declared within the declarative section and are raised explicitly. TRUE
The executable section of the procedure body requires a minimum of _____ statement. ONE
Another way of initializing a default value for parameter is by using assignment operator. True
The actual is a special form of a variable, whose input values are initialized by the calling environment when the subprogram is called, and whose output values are returned to the calling environment when the subprogram returns control to the caller. False
In stored function, the ______ clause is used instead of OUT mode. RETURN
What is missing in the code below? create or replace function sample return is begin return 5+5; end; Data type of the returned value
The formal parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram. False
What is missing in the procedure header? CREATE PROCEDURE raise_sal(p_id IN NUMBER, p_sal IN NUMBER) IS BEGIN ... END; Nothing is missing
Which parameter mode can be assigned a default value? IN OUT IN OUT IN
Which can be used to assign a default value to IN parameters? Assignment operator := DEFAULT All the options All the options
A function can be called as a part of: Group of answer choices Both options SQL statement PL/SL expression Both options
In anonymous block, DECLARE states “this is the start of a block”. In Procedure, ____________ states “this is the start of a subprogram”. CREATE PROCEDURE
Subprograms are explicitly shared. True
The positional parameter passing uses the associate operator. Group of answer choices False
The Positional parameter passing is the common method of passing parameters. True
The OUT parameter mode supplies an input value, which can be returned (output) as a modified value. False
How many private variables are there in the given code? CREATE or replace procedure raise_sal (empid my_employees.employee_id%TYPE := 1234, emp_raise number) IS BEGIN 0
In Procedure, the default parameter mode is _______. IN
Subprograms are implicitly shared. False
The DEFAULT keyword is used to assign a default value for formal parameters. False
Assuming add_dept procedure has two parameters: p_name and p_id, what is the error in the given procedure call? add_dept ('ADVERTISING', p_loc => 1400) The named parameter
Using an _______ parameter mode, you can pass a value into a procedure that can be updated within the procedure. IN OUT
If Combination notation is used, the _______ parameters must come first. POSITIONAL
The functions used in SQL statements cannot use _____ or IN OUT modes. OUT
Which of the statement below is valid? Assuming that get_sal procedure exists with one OUT parameter. x:=100; DBMS_OUTPUT.PUT_LINE(get_sal(x));
The DECLARE keyword is not used in a subprogram. True
The actual is a special form of a variable, whose input values are initialized by the calling environment when the subprogram is called, and whose output values are returned to the calling environment when the subprogram returns control to the caller. False
The IN parameters can only be read within the procedure and cannot be modified. True
A function can be called as a part of: SQL statement, PL/SQL expression
A function can be called as a part of: Group of answer choices Both options SQL statement PL/SL expression Both options
A function must have a _______ clause in the header and at least one RETURN statement in the executable section. RETURN
Subprograms are named PL/SQL blocks that are compiled and stored in the _______. DATABASE
The executable section of the procedure body requires a minimum of _____ statement. ONE
Another way of initializing a default value for parameter is by using assignment operator. True
he actual is a special form of a variable, whose input values are initialized by the calling environment when the subprogram is called, and whose output values are returned to the calling environment when the subprogram returns control to the caller. False
In stored function, the ______ clause is used instead of OUT mode. RETURN
What is missing in the code below? create or replace function sample return is begin return 5+5; end; Data type of the returned value
The formal parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram. False
What is missing in the procedure header? CREATE PROCEDURE raise_sal(p_id IN NUMBER, p_sal IN NUMBER) IS BEGIN ... END; Nothing is missing
Which parameter mode can be assigned a default value? IN OUT IN OUT IN
Which can be used to assign a default value to IN parameters? Assignment operator := DEFAULT All the options
A function can be called as a part of: Group of answer choices Both options SQL statement PL/SL expression Both options
In anonymous block, DECLARE states “this is the start of a block”. In Procedure, ____________ states “this is the start of a subprogram”. CREATE PROCEDURE
Subprograms are explicitly shared. True
The positional parameter passing uses the associate operator. Group of answer choices False
The Positional parameter passing is the common method of passing parameters. True
The OUT parameter mode supplies an input value, which can be returned (output) as a modified value. False
How many private variables are there in the given code? CREATE or replace procedure raise_sal (empid my_employees.employee_id%TYPE := 1234, emp_raise number) IS BEGIN 0
In Procedure, the default parameter mode is _______. IN
Subprograms are implicitly shared. False
The DEFAULT keyword is used to assign a default value for formal parameters. False
Assuming add_dept procedure has two parameters: p_name and p_id, what is the error in the given procedure call? add_dept ('ADVERTISING', p_loc => 1400) The named parameter
Using an _______ parameter mode, you can pass a value into a procedure that can be updated within the procedure. IN OUT
If Combination notation is used, the _______ parameters must come first. POSITIONAL
The functions used in SQL statements cannot use _____ or IN OUT modes. OUT
Which of the statement below is valid? Assuming that get_sal procedure exists with one OUT parameter. Which of the statement below is valid? Assuming that get_sal procedure exists with one OUT parameter.
What is the error of the given code? BEGIN add_dept(name =>'new dept', 'new location'); END; Positional parameter must come before named parameter
What is missing in the given code below? CREATE or replace procedure raise_sal (empid my_employees.employee_id%TYPE := 1234emp_raise number)BEGIN update employees set salary = salary + (salary * (emp_raise/100) where employee_id = emp; END; Not in the options
What is the symbol used for association operator? =>
Given the procedure below, what is the correct way of invoking the procedure? CREATE OR REPLACE PROCEDURE show_emps (p_emp_id IN NUMBER, p_department_id IN number, p_hiredate IN DATE) IS begin . . . . . . End; All the options
In PL/SQL ___________, the function identifier acts like a variable whose value depends on the parameters passed to it. EXPRESSION
The _______ is added to CREATE PROCEDURE clause to overwrite an existing procedure. OR REPLACE
In the given Procedure header, the underlined clause/keyword is mandatory. CREATE OR REPLACE PROCEDURE name [parameters] IS|AS True
A procedure is compiled and stored in the database as a schema object. True
The Named parameter passing is the common method of passing parameters. False
Another way of initializing a default value for parameter is by using assignment operator. True
We can assign a default value to parameters. False
A procedure can be invoked in another procedure. True
Three ways of passing parameters from the calling environment: POSITIONAL, NAMED, COMBINATION
Given the procedure below, how many parameters will return a value to the calling environment? CREATE OR REPLACE PROCEDURE show_emps (p_emp_id NUMBER, p_department_id OUT number, p_hiredate IN OUT DATE) IS begin End; 2
What keyword is missing in the given function construct? CREATE [OR REPLACE] function_name [(parameter1 [mode1] datatype1, ...)] RETURN datatype IS|AS [local_variable_declarations; …] BEGIN actions; RETURN expression; END [function_name] FUNCTION
What is missing in the code below? create or replace function sample return number is begin return 5+5; end; Nothing is missing
What follows the RETURN keyword at the function header? DATA TYPE
Created by: rusean
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards