Save
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

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.

Question

Which keyword is omitted in the declaration section of the procedure? _____
click to flip
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't know

Question

Subprograms become the building blocks of packages and triggers.
Remaining cards (134)
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

Database SA2

summative

QuestionAnswer
Which keyword is omitted in the declaration section of the procedure? _____ DECLARE
Subprograms become the building blocks of packages and triggers. True
Subprograms are implicitly shared. False
The code below is a correct example of passing parameters by combination notation. add_dept (p_loc=>1400, 'EDUCATION' ); False
A procedure can be invoked in another procedure. True
The positional parameter passing uses the associate operator. False
If Combination notation is used, the positional parameters must come first before the named parameters. True
The Positional parameter passing is the common method of passing parameters. True
How many parameters are there in the given code? CREATE or replace procedure raise_sal (empid my_employees.employee_id%TYPE := 1234, emp_raise number) ISBEGINupdate employees set salary = salary + (salary * (emp_raise/100) where employee_id = emp; END; 2
Three ways of passing parameters from the calling environment: POSITIONAL, NAMED, COMBINATION
Which type of parameter passing uses an association operator? Named
The functions used in SQL statements cannot use OUT or _____ modes. IN OUT
In stored function, the RETURN clause is used instead of ____ mode. OUT
In PL/SQL ___________, the function identifier acts like a variable whose value depends on the parameters passed to it. EXPRESSION
The functions used in SQL statements cannot use ____ or IN OUT modes. OUT
A function must have a _______ clause in the header and at least one RETURN statement in the executable section. RETURN
The _____ are named PL/SQL blocks that are compiled and stored in the database. SUBPROGRAMS
Subprograms are named PL/SQL blocks that are compiled and stored in the _______. DATABASE
You cannot invoke a procedure from inside an SQL statement. True
Subprograms are explicitly shared. True
The OUT parameter mode supplies an input value, which can be returned (output) as a modified value. False
False True
The DEFAULT keyword is used to assign a default value for formal parameters. False
Which parameter mode can be assigned a default value? IN OUT IN OUT IN
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 is the error of the given code? BEGIN add_dept(name =>'new dept', 'new location'); END; Positional parameter must come before named parameter
Subprograms are implicitly shared. False
The code below is a correct example of passing parameters by combination notation. add_dept (p_loc=>1400, 'EDUCATION' ); False
A procedure can be invoked in another procedure. True
The positional parameter passing uses the associate operator. False
If Combination notation is used, the positional parameters must come first before the named parameters. True
The Positional parameter passing is the common method of passing parameters. True
How many parameters are there in the given code? CREATE or replace procedure raise_sal (empid my_employees.employee_id%TYPE := 1234, emp_raise number) ISBEGINupdate employees set salary = salary + (salary * (emp_raise/100) where employee_id = emp; END; 2
Three ways of passing parameters from the calling environment: POSITIONAL, NAMED, COMBINATION
Which type of parameter passing uses an association operator? Named
The functions used in SQL statements cannot use OUT or _____ modes. IN OUT
In stored function, the RETURN clause is used instead of ____ mode. OUT
In PL/SQL ___________, the function identifier acts like a variable whose value depends on the parameters passed to it. EXPRESSION
The functions used in SQL statements cannot use ____ or IN OUT modes. OUT
A function must have a _______ clause in the header and at least one RETURN statement in the executable section. RETURN
The _____ are named PL/SQL blocks that are compiled and stored in the database. SUBPROGRAMS
Subprograms are named PL/SQL blocks that are compiled and stored in the _______. DATABASE
You cannot invoke a procedure from inside an SQL statement. True
Subprograms are explicitly shared. True
The OUT parameter mode supplies an input value, which can be returned (output) as a modified value. False
False True
The DEFAULT keyword is used to assign a default value for formal parameters. False
Which parameter mode can be assigned a default value? IN OUT IN OUT IN
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 is the error of the given code? BEGIN add_dept(name =>'new dept', 'new location'); END; Positional parameter must come before named parameter
In stored function, the ______ clause is used instead of OUT mode. RETURN
A function must have a RETURN clause in the _____ and at least one RETURN statement in the executable section. HEADER
What follows the RETURN keyword at the function header? DATA TYPE
What is missing in the code below? create or replace function sample return number is num number(2); begin num := 5+5; end; No return value
The purpose of the OR REPLACE clause is to ______ an existing procedure. OVERWRITE
In Procedure, all parameter modes must be specified. True
In the given Procedure header, the underlined clause/keyword is optional. CREATE OR REPLACE PROCEDURE name [parameters] IS|AS True
The symbol >> is used for association operator? False
To invoke a procedure from another procedure, use a direct call inside an executable section of the block. 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
What is the symbol used for association operator? =>
What is missing in the given code below? CREATE or replace procedure raise_sal (empid my_employees.employee_id%TYPE := 1234, emp_raise number) BEGIN update employees set salary = salary + (salary * (emp_raise/100) where employee_id = emp; END; Not in the options
The functions used in SQL statements cannot use _____ or IN OUT modes. OUT
What follows the RETURN keyword at the function header? DATA TYPE
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));
In PL/SQL ___________, the function identifier acts like a variable whose value depends on the parameters passed to it. FUNCTION CALLS
When invoking a function as part of a PL/SQL expression, you can use a _______ to store the returned result. VARIABLE
A _______ triggers execute whenever a particular event occurs within an application. APPLICATION
A row trigger fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER. True
The database event triggers are fired by non-SQL events in the database. True
A row trigger may SELECT from a mutating table. False
The ON SCHEMA cannot be used with SHUTDOWN and STARTUP events. True
The ON SCHEMA fires the trigger only for _______ sessions. OWN
The ______ triggers can either be ON DATABASE or ON SCHEMA. DDL
You can use triggers to generate derived column values _________. AUTOMATICALLY
Event determines which DML operation causes the trigger to fire. Values are DELETE, UPDATE [OF column], and ______. INSERT
The conditional predicates are: _______, INSERTING, UPDATING. DELETING
A row trigger fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER. True
A ON SCHEMA fires the trigger for DDL on all schemas in the database. False
The CALL is a statement is used to invoke procedure in a trigger. True
The ______ fires the trigger only for your own sessions. ON SCHEMA
Trigger executes ________ whenever the associated action occurs. Implicitly
The ____ trigger timing executes the trigger body before the triggering DML event on a table. BEFORE
You specify a row trigger using __________clause. FOR EACH ROW
The ________trigger is the default type of DML trigger. STATEMENT
The Conditional Predicates keywords are automatically declared Boolean variables which are set to TRUE or FALSE by the Oracle server. These keywords maybe used in the trigger body instead of UPDATE, INSERT, DELETE. True
A statement-level trigger fires once for each row affected by the triggering DML statement, either just BEFORE the row is processed or just AFTER. False
You specify a row trigger using FOR ROW clause. False
The database triggers are fired by non-SQL events in the database. False
The ON DATABASE fires the trigger only for your own sessions. False
The ON SCHEMA fires the trigger only for your own sessions. True
A row-level trigger must not query or modify a mutating table. True
A ________trigger must not query or modify a mutating table. ROW-LEVEL
An ON DATABASE fires the trigger for ____ on all schemas in the database. DDL
The __________ cannot be used with SHUTDOWN and STARTUP events. ON SCHEMA
A ________ table is an object that is currently being modified by a DML statement. MUTATING TABLE
The ______ fires the trigger only for your own sessions. ON SCHEMA
To invoke package subprograms, fully ____the (public) subprogram with its PACKAGE NAME. QUALIFY
The _____ is the interface to your applications that declares the constructs (procedures, functions, variables, and so on) which are visible to the calling environment. PACKAGE SPECIFICATION
The OR REPLACE option deletes an existing package body. False
Variables declared in the package specification are initialized to NULL by default. True
Trigger executes explicitly whenever the associated action occurs. True
Since triggers are never explicitly invoked, they cannot receive parameters. True
Database triggers execute automatically whenever a data event such as _______ occurs. DML, DDL
Which will view the detailed code and status of the trigger in data dictionary? USER_TRIGGERS
A DML trigger is a trigger that is automatically fired (executed) whenever an SQL DML statement (INSERT, UPDATE, or DELETE) is executed. True
DML Trigger is classified in two ways: when they execute, how they execute. False
The given trigger header contains no error. CREATE OR REPLACE TRIGGER emp_del_trigg AFTER DELETE ON employees BEGIN <assume valid PL/SQL statements here> END; True
You cannot create a DDL trigger that refers to a specific database object. True
The ON SCHEMA fires the trigger only for your own sessions. True
A ON DATABASE fires the trigger for DDL on all schemas in the database. True
The code below will: CREATE OR REPLACE TRIGGER log_create_trigg AFTER CREATE ON SCHEMA BEGIN INSERT INTO log_table VALUES (USER, SYSDATE); END; The trigger fires whenever any type of object is created in your schema.
The _________ are fired by non-SQL events in the database. Database event trigger
A SYSTEM trigger execute automatically whenever a data event or a system event occurs. False(DATABASE TRIGGER)
Parameters in subprograms are optional. 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 executable section of the procedure body requires a minimum of _____ statement. 1
In Procedure, the default parameter mode is IN. True
The IN parameters can only be read within the procedure and cannot be modified. True
The formal parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram. False
If Combination notation is used, the _______ parameters must come first. POSITIONAL
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
The block structure of the subprograms is similar to the structure of _____ blocks. ANONYMOUS
The block structure of the subprograms is similar to the structure of anonymous blocks. True
The type of parameter that is declared in procedure heading is called ________. FORMAL
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
The parameter modes are specified in: FORMAL PARAMETER
A function must have a _______ clause in the header and at least one RETURN statement in the executable section. RETURN
Which of the statement below is valid? Assuming that get_sal function exists with parameter. Not in the options
We can assign a default value to parameters. False
The ____ parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram. ACTUAL
A ______ is a named PL/SQL block that returns exactly one value. FUNCTION
What is missing in the code below? create or replace function sample is num number(2); begin num := 5+5; return num; end; Not in the options
Which of the statement below is valid? Assuming that get_sal procedure exists with one IN parameter. All the options
Created by: Sangunius
 

 



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