click below
click below
Normal Size Small Size show me how
DBMS
| Question | Answer |
|---|---|
| The ______ clause is used in DML statement to specify variable(s) that will hold the value(s) that SQL returns from the SELECT clause. | INTO |
| The DDL and _______ SQL statements cannot be used directly in PL/SQL. | DCL |
| The _____ statement selects rows from one table to update and/or insert into another table. | MERGE |
| The INTO clause occurs between the SELECT and _______ clauses. | FROM |
| The _______cursor are automatically defined by Oracle. | IMPLICIT |
| Boolean attribute that evaluates to TRUE if the most recent SQL statement did not return even one row. A. | SQL%NOTFOUND |
| What is the output of the given code below? DECLARE v_deptno copy_emp.department_id%TYPE := 50; BEGIN DELETE FROM copy_emp WHERE department_id = v_deptno; DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' rows deleted.'); END; | Print the number of rows deleted |
| What could be the possible error of the given code below? DECLARE v_sum_sal NUMBER(10,2); v_deptno NUMBER NOT NULL := 60; BEGIN SELECT SUM(salary) INTO v_sum_sal FROM employees WHERE department_id = v_deptno; DBMS_OUTPUT.PUT_LINE('Dep | No error |
| Applying the logical operator NOT to a null yields NULL. | True |
| Refer to M1S2-code reference#3, data type for vmesg variable must be CHAR. | False |
| The use of CASE statement to test conditions such as <, >, >=, <= is know as case expression. | False |
| Consider the given code fragment below. The condition will return a false value. A:=null; B:=null; If A = B then . . . . . | True |
| A _______ is an expression with a TRUE or FALSE value that is used to make a decision. | Condition |
| The use of CASE statement to test conditions such as <, >, >=, <= is know as: | Searched CASE statement |
| The type of loop where the statement inside the loop must execute at least once. | BASIC LOOP |
| All counter variables must be declared at the declaration section. | False |
| In BASIC and WHILE loop, the iteration will terminate when the counter value meets the upper bound value. | False |
| Without the EXIT statement, the loop would never end (an infinite loop). | True |
| In BASIC and WHILE loop, initialization of counter variable is necessary. | True |
| The RAISE statement can be used to raise either user-defined or predefined exception. | FALSE |
| You can use the RAISE_APPLICATION_ERROR procedure to return user-defined error messages from stored subprograms. | TRUE |
| 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 |
| Pragma declaration is used in declaring user-defined exceptions. | FALSE |
| The oracle error number, at the PRAGMA EXCEPTION_INIT function, starts with _____. | HYPEN |
| The ______ returns character data containing the message associated with the error number. | SQLERRM |
| Two methods for raising an exception: | Implicit, Explicit |
| 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 |
| The given syntax in declaring a user-define record is incorrect. TYPE type_name IS RECORD (field_declaration[,field_declaration]...); identifier type_name ; | FALSE |
| The given syntax in declaring a user-define record is correct. TYPE type_name IS RECORD (field_declaration[,field_declaration]...); identifier type_name ; Group of answer choices | True |
| What step is missing in the given code? DECLARE CURSOR cur_emps SELECT employee_id, last_name FROM employees; BEGIN FOR v_emp_record IN cur_emps LOOP EXIT WHEN cur_emps%ROWCOUNT > 5; DBMS_OUTPUT.PUT_LINE(v_emp_record.employe | Nothing is missing |
| The __________ clause is used in conjunction with the FOR UPDATE clause to refer to the most recently fetched row in an explicit cursor. | WHERE CURRENT OF |
| The NOWAIT keyword is mandatory in the FOR UPDATE clause. | FALSE |
| What symbol is used to enclose the elements of the TYPE structure? | () |
| In exception section, the WHEN clause if followed by a condition. | FALSE |
| A block always terminates when PL/SQL raises an exception. | TRUE |
| Names for predefined exceptions must be declared in the declaration section. | FALSE |
| What is the first step in handing non-predefined exception? | Exception name declaration |
| Each exception handler is consists of a _____ clause, which specifies an exception name. | WHEN |
| PL/SQL records contain one or more components/fields of any scalar or composite type. | True |