click below
click below
Normal Size Small Size show me how
DBS idk FA2
baka mali to
| Question | Answer |
|---|---|
| A ___ allows us to declare a variable as a record based on a particular table’s structure. | %ROWTYPE |
| TYPE and RECORDS are ____ structures. | COMPOSITE |
| The OPEN statement positions the cursor pointer at the first row | TRUE |
| Given the code below: 4.1 | TRUE |
| 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 |
| Code that defines the recovery actions to be performed when execution-time errors occur. | EXCEPTION HANDLER |
| When an exception is raised, control immediately shifts to the ___ and the appropriate handler in the exception section is executed. | EXCEPTION SECTION |
| In exception section, the WHEN clause if followed by ____ | EXCEPTION NAME |
| The RAISE keyword is used by non-predefined exception. | FALSE |
| The following statements are examples of exception. - Entering an expiration date that has passed - Selecting more than one row into a single variable - Receiving “no rows returned” from a select statement | TRUE |
| In exception section, the WHEN clause if followed by a condition. | FALSE |
| A block always terminates when PL/SQL raises an exception. | TRUE |
| When an exception is raised, the rest of the execution section of the PL/SQL block is not executed. | TRUE |
| User-defined exceptions are declared within the declarative section and are raised explicitly. | TRUE |
| The RAISE statement can be used to raise either user-defined or predefined exception. | FALSE |
| Pragma declaration is used in declaring user-defined exceptions. | FALSE |
| Pragma declaration is used in declaring non-predefined exceptions. | TRUE |
| The PRAGMA clause is used in predefined exception to tell the compiler to associate an exception name with a specific Oracle error number. | FALSE |
| The RAISE statement can be used to raise either user-defined or ____ exception | PREDEFINED |
| In trapping a user-defined exception, these steps must be followed: DECLARE > RAISE > ___. | REFERENCE |
| 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 NO_DATA_FOUND is a __ exception. | PREDEFINED |
| The NO_DATA_FOUND is an example of | PREDEFINED EXCEPTION |
| A user-defined PL/SQL record contains one or more fields of scalar data type. | FALSE |
| The %ROWTYPE cannot be used to declare a record based on another record. | FALSE |
| The %ROWTYPE can be used to declare a record based on another record. | TRUE |
| Given the code below: 28 .1 | CUR_EMPS |
| Given the code below: 29 .1 | V_EMP_RECORD |
| Given the code below: 30.1 | CUR_EMPS IN V_EMP_RECORD |
| The block below will display the country name and the area of each country in a chosen region. The region_id should be passed to the cursor as a parameter. The block is tested using region 5(South America) | COUNTRY_REC |
| If you omit the NOWAIT keyword, then the Oracle server waits indefinitely until the ___ are available. | ROWS |
| The block below will display the country name and the area of each country in a chosen region. The region_id should be passed to the cursor as a parameter. The block (South America).(How many parameter is needed to be passed from the calling environment?) | 1 |
| When we declare a cursor FOR UPDATE, each row is locked as we open the cursor and prevent other users from reading the rows. | FALSE |
| When we declare a cursor FOR UPDATE, each row is locked as we open the cursor but does not prevent other users from reading the rows. | TRUE |
| What keyword is missing in the given syntax of user-define record? ______TYPE type_name RECORD (field_declaration[,field_declaration]...); identifier typename ; | IS |
| Given: DECLARE v_emp_record _______________; What is missing in the declaration section if we want to declare v_emp_record as type record of EMPLOYEES table? __________ | EMPLOYEES%ROWTYPE |
| Given the code below: 3.2 | FALSE |
| Give the code bellow 4.2 | TRUE |
| The _______ is an optional exception-handling clause that traps any exceptions that have not been explicitly handled. | OTHERS |
| What is missing in the given exception syntax? ____ EXCEPTION WHEN exception1 [OR exception2 . . .] statement1; statement2; | THEN |
| Each exception handler is consists of a _____ clause, which specifies an exception name. | WHEN |
| In exception section, the WHEN clause if followed by _______. | EXCEPTION NAME |
| Each ________ is consists of a WHEN clause, which specifies an exception name. | HANDLER |
| The following statements are examples of exception. - Entering an expiration date that has passed - Selecting more than one row into a single variable - Receiving “no rows returned” from a select statement | TRUE |
| When an exception is raised, control immediately shifts to the exception section and the appropriate handler in the exception section is executed. | TRUE |
| The RAISE keyword is used by non-predefined exception. | FALSE |
| The OTHERS is mandatory exception-handling clause that traps any exceptions that have not been explicitly handled. | FALSE |
| Exception section is mandatory in PL/SQL block. | FALSE |
| There are 2 parameters needed in the pragma declaration of an exception. | TRUE |
| The SQLCODE function returns the numeric value for the error code. | TRUE |
| Non-predefined exceptions has a standard Oracle error number (ORA-#####) and error message, but not a predefined name. | TRUE |
| User-defined exceptions are declared within the declarative section and are raised explicitly. | TRUE |
| The PRAGMA clause is used in predefined exception to tell the compiler to associate an exception name with a specific Oracle error number. | FALSE |
| The RAISE statement can be used to raise either ________ or predefined exception. | USER DEFINED |
| The NO_DATA_FOUND is an example of: | Predefined exception |
| The ___________ and ___________ are the two types of Oracle Server Errors. | Predefined, Non-predefined |
| The ________ clause is used in user-defined exception to tell the compiler to associate an exception name with a specific Oracle error | RAISE… |
| Given the code below, EMPLOYEES table must be specified at the DBMS_OUTPUT section. DECLARE v_emp_record employees2%rowtype; BEGIN SELECT * INTO v_emp_record FROM employees2 WHERE employee_id = 100; DBMS_OUTPUT.PUT_LINE('Email for ' || ____________ | FALSE |
| Type and record declared in the outer block are visible only in the outer block. | FALSE |
| The given syntax in declaring a user-define record is incorrect. TYPE type_name IS RECORD (field_declaration[,field_declaration]...); identifier type_name ; | FALSE |
| In explicit cursor operations, the set of rows returned by a multiple-row query is called ________. | ACTIVE SET |
| What will cause an error in the FOR section? | cur_emps IN v_emp_record |
| Given the code below: 28.2 | What is missing in line 2 and 3? IS |
| You must include the FOR UPDATE clause in the cursor query so that the rows are _____ on OPEN. | LOCKED |
| If you omit the NOWAIT keyword, then the Oracle server waits indefinitely until the _____ are available. | ROWS |
| The block below will display the country name and the area of each country in a chosen region. The region _id should be passed to the cursor as a parameter. | COUNTRY_CURS |
| The block below will display the country name and the area of each country in a chosen region. The region _id should be passed to the cursor as a parameter. (5 South America) | TRUE |
| Refers to the code below . The missing element in line 8 COUNTRY_REC | TRUE |
| 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 |