click below
click below
Normal Size Small Size show me how
DATABASE SYSTEMS
F3
| Question | Answer |
|---|---|
| In the given Procedure header, the ________clause is optional. CREATE OR REPLACE PROCEDURE name [parameters] IS|AS | parameters |
| In anonymous block, DECLARE states “this is the start of a block”. In Procedure, ____________ states “this is the start of a subprogram”. | IS|AS |
| The executable section of the procedure body requires a minimum of _____ statement. | A minimum of one statement |
| Subprograms are implicitly shared. Group of answer choices True False | False |
| Subprograms are implicitly shared. Group of answer choices True False | False |
| If Combination notation is used, the positional parameters must come first before the named parameters. Group of answer choices True False | 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 | True |
| The code below is a correct example of passing parameters by combination notation. add_dept (p_loc=>1400, 'EDUCATION' ); Group of answer choices True False | False |
| The IN parameters can only be read within the procedure and cannot be modified. Group of answer choices True False | True |
| To invoke a procedure from another procedure, use a direct call inside an executable section of the block. Group of answer choices True False | True |
| The type of parameter that is declared in procedure heading is called ________. Group of answer choices FORMAL ACTUAL | FORMAL |
| 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) IS | 2 |
| Using an _______ parameter mode, you can pass a value into a procedure that can be updated within the procedure. Group of answer choices IN IN OUT OUT All the options | IN OUT |
| Three ways of passing parameters from the calling environment | POSITIONAL, NAMED, COMBINATION |
| What is missing in the given code below? CREATE or replace procedure raise_sal (empid my_employees.employee_id%TYPE := 1234, emp_raise number) | Incomplete declaration of emp_raise parameter |
| What is missing in the code below? create or replace function sample is begin return 5+5; end; | RETURN |
| The functions used in SQL statements cannot use OUT or _____ modes. | IN OUT |
| What is missing in the code below? create or replace function sample is num number(2); begin num := 5+5; return num; end; | Size of the returning value |
| 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 |
| 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 |
| Subprograms are named PL/SQL blocks that are compiled and stored in the _______. | DATABASE |
| The _____ are named PL/SQL blocks that are compiled and stored in the database. | SUBPROGRAMS |
| The purpose of the OR REPLACE clause is to ______ an existing procedure. | replace |
| In Procedure, all parameter modes must be specified. Group of answer choices True False | True |
| In the given Procedure header, the underlined clause/keyword is optional. CREATE OR REPLACE PROCEDURE name [parameters] IS|AS Group of answer choices True False | TRUE |
| We can assign a default value to parameters. Group of answer choices True False | TRUE |
| The Positional parameter passing is the common method of passing parameters. Group of answer choices True False | TRUE |
| The positional parameter passing uses the associate operator. Group of answer choices True False | FALSE |
| What is the error of the given code? BEGIN add_dept(name =>'new dept', 'new location'); END; | Positional parameter must come before named parameter |
| The operator => is called _______. | Association operator |
| 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 |
| 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 update employees | 2 |
| In stored function, the parameter mode should only be | IN |
| Functions return only a single value, and the value is returned through a ______ statement. | RETURN |
| Which of the statement below is valid? Assuming that get_sal procedure exists with one OUT parameter. | x:= 200; DBMS_OUTPUT.PUT_LINE(get_sal(100+x)); |
| In PL/SQL ___________, the function identifier acts like a variable whose value depends on the parameters passed to it. Group of answer choices PARAMETER STATEMENT SELECT EXPRESSION | EXPRESSION |
| The purpose of the OR REPLACE clause is to ______ an existing procedure. | MODIFY |
| The DECLARE keyword is not used in a subprogram. Group of answer choices True False | TRUE |
| The formal parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram. Group of answer choices True False | TRUE |
| The OUT parameter mode supplies an input value, which can be returned (output) as a modified value. Group of answer choices True False | FALSE |
| A procedure can be invoked in another procedure. Group of answer choices True False | TRUE |
| We can assign a default value to parameters. (CORRECT V) | FALSE |
| What is missing in the procedure header? CREATE PROCEDURE raise_sal(p_id IN NUMBER, p_sal IN NUMBER) IS BEGIN ... END; Group of answer choices Nothing is missing Procedure name after END Parameter data type size ; | NOTHING IS MISSING |
| 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); | Positional parameter must come before named parameter |
| The ____ parameters can be literal values, variables, or expressions that are sent to the parameter list of a called subprogram. Group of answer choices FORMAL ACTUAL | ACTUAL |
| What is the symbol used for association operator? Group of answer choices => = >= >> | => |
| The parameter modes are specified in: | FORMAL |
| A function must have a _______ clause in the header and at least one RETURN statement in the executable section. | RETURN TYPE |
| The functions used in SQL statements cannot use ____ or IN OUT modes. Group of answer choices OUT IN | OUT |
| Which of the statement below is valid? Assuming that get_sal function exists with no parameter. Group of answer choices v_salary := get_sal + 50; v_salary := get_sal() + 50; get_sal() + 50; get_sal + 50; | v_salary := get_sal() + 50; |
| The _______ is added to CREATE PROCEDURE clause to overwrite an existing procedure. | OR REPLACE |
| Parameters in subprograms are optional. Group of answer choices True False | TRUE |
| The DEFAULT keyword is used to assign a default value for formal parameters. Group of answer choices True False | TRUE |
| Which keyword is omitted in the declaration section of the procedure? _____ | DECLARE |
| The Named parameter passing is the common method of passing parameters. Group of answer choices True False | FALSE |
| When invoking a function as part of a PL/SQL expression, you can use a _______ to store the returned result. | VARIABLE |
| In PL/SQL ___________, the function identifier acts like a variable whose value depends on the parameters passed to it. | FUNCTION CALLS |