click below
click below
Normal Size Small Size show me how
DBSA
| Question | Answer |
|---|---|
| The ______ are automatically declared variables that allow you to evaluate what happened when a cursor was last used. | Cursor Attributes |
| The memory area allocated by Oracle server to store the SQL statement and the data that it uses in known as __________. | CURSOR |
| The _______cursor are automatically defined by Oracle. | IMPLICIT |
| The use of INTO clause in PL/SQL select statement is to specify the name of ________. | VARIABLES |
| The ______ is a Boolean attribute that evaluates to True if the most recent SQL statement returned at least one row. | SQL%FOUND |
| Which SQL statements cannot be used directly in PL/SQL? | DDL, DCL |
| DECLARE v_deptno copy_emp.department_id%TYPE := 50; BEGIN DELETE FROM copy_emp WHERE _____________ = v_deptno; DBMS_OUTPUT.PUT_LINE(SQL%ROWCOUNT || ' rows deleted.'); END; | DEPARTMENT_ID |
| What could be the possible error of the given code below? DECLARE v_deptno employees.department_id%TYPE := 10; BEGIN DELETE FROM copy_emp WHERE department_id = v_deptno; END; | No error |
| Which DML statement make changes to the database? | ALL THE OPTIONS |
| The code below Declare v_cal_increase employees.salary%type := 800; begin update copy_emp set salary = salary + v_sal_increase where job_id = ‘ST_CLERK’; dbms_output.put_line(_____________ || ‘ rows updated.’); End; | SQL%ROWCOUNT |
| Consider the given code fragment below. The condition will return a false value. A:=null; B:=null; If A = B then . . . . . | True pero false daw |
| Refer to M1S2-code reference#3, is the symbol used for the assignment operator correct? | True |
| The use of CASE statement to test conditions such as <, >, >=, <= is know as case expression. | False |
| Refer to M1S2-code reference#3, data type for vmesg variable must be CHAR. | False |
| Refer to M1S2-code reference#2, the missing condition in (2) is vpop = 0. | True |
| Refer to M1S2-code reference#1, what is that last missing element? | end if; |
| Refer to M1S2-code reference#2, what should be the condition in (3)? | vpop >= 1000000000 *** |
| The ______ is the symbol used for the assignment operator. | = |
| Refer to M1S2-code reference#3, what is missing in the given CASE structure? | Nothing is missing |
| What is missing in the given code? DECLARE v_myage NUMBER := 31; BEGIN IF v_myage < 11 DBMS_OUTPUT.PUT_LINE('I am a child'); END IF; END; | Not in the option |
| Use the ______ loop when the statement inside the loop must execute at least once. | BASIC |
| Refer to M1S3-code reference #4, what is the missing operator in the EXIT section? | > |
| Refer to M1S3-code reference#1, what should be the initial value of vctr? | 51 |
| In BASIC and WHILE loop, the iteration will terminate when the counter value meets the upper bound value. | False |
| The lower and upper bound of a for loop must be a numeric literals. | False *** |
| In BASIC and WHILE loop, the iteration will terminate when the counter is > than the upper bound. | False |
| Use a DO..WHILE loop when the statement inside the loop must execute at least once. | True |
| In BASIC and WHILE loop, the iteration will terminate when the counter is < than the upper bound. | False |
| The _____ is an integer value that represents the number of rows affected by the most recent SQL statement. | SQL%ROWCOUNT |
| The _________ cursors are defined by the PL/SQL programmer. | EXPLICIT |
| The DDL and _______ SQL statements cannot be used directly in PL/SQL. | DCL |
| v_sum_sal NUMBER(10,2); v_deptno NUMBER NOT NULL := 60; BEGIN SELECT SUM(salary) FROM employees WHERE department_id = v_deptno; DBMS_OUTPUT.PUT_LINE('Dep #60 Salary Total: ' || v_sum_sal); END; | Missing INTO clause |
| The _______ statement selects rows from one table to update and/or insert into another table. | MERGE |
| 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 |
| Boolean attribute that evaluates to TRUE if the most recent SQL statement did not return even one row. A. | SQL%NOTFOUND |
| What could be the possible error of the given code below? DECLARE v_salary employees.salary%TYPE; BEGIN SELECT salary INTO v_salary FROM employees where employee_id = 100; DBMS_OUTPUT.PUT_LINE(' Salary is : ' || v_salary); END; | NO ERROR |
| A counter variable is an expression that returns true, false, or null. | False |
| Refer to M1S2-code reference#3, what must be displayed in the dbms_output? | VMESG |
| Refer to M1S2-code reference#3, what is missing in the last case selection? | > 10000 |
| A _______ is an expression with a TRUE or FALSE value that is used to make a decision. | Condition |
| Refer to M1S2-code reference#2, what is the missing condition in (2)? | vpop = 0 |
| The _______ is an expression that returns true, false, or null. | CONDITION |
| Refer to M1S3-code reference#2, what is missing in the SELECT statement? _________ | V_LOC_ID |
| In for loop, counter variable is declared _______. | IMPLICITLY |
| All counter variables must be declared at the declaration section. | False *** |
| Refer to M1S3-code reference#1, the loop body will be performed 5 times. | True |
| Refer to M1S3-code reference #4, the ‘>’ is the missing operator in the EXIT section. | True *** |
| The BASIC LOOP control structures are statements that enable you to execute statements in a PL/SQL block repeatedly. | True |
| The INTO clause occurs between the SELECT and _______ clauses. | FROM |
| The DML statement: INSERT, DELETE, ________ make changes to the database. | UPDATE |
| The _________ SQL Rule: queries must return only one row. | EMBEDDED OR IMPLICIT*** |
| Declare v_sal_increase employees.salary%type := 800; begin update copy_emp set salary = salary + v_sal_increase where job_id = ‘ST_CLERK’; dbms_output.put_line(SQL%FOUND || ‘ rows updated.’); end; | SQL%FOUND |
| . What is missing in the given code below? DECLARE v_salary employees.salary%TYPE; BEGIN SELECT salary INTO ________ FROM employees where employee_id = 100; DBMS_O | V_SALARY |
| Refer to M1S2-code reference#3, the table name AIRPORT is missing in the creation of the implicit cursor. | False |
| Control structures are used to change the logical flow of statements within the PL/SQL block. | True |
| The _______ are used to change the logical flow of statements within the PL/SQL block. | Control Structures |
| Refer to M1S2-code reference#3, what is missing in the creation of the implicit cursor? | Airports *** |
| What is missing in the given WHILE loop syntax? ________ WHILE condition statement1; statement2; . . . END ; | LOOP |
| Refer to M1S3-code reference#1, how many time the loop body will be performed? __________ | 5 |
| Refer to M1S3-code reference#1, what is missing in the creation of the implicit cursor inside the loop body? _______ | V_LOC_ID |
| In for loop, counter must be explicitly declared. | FALSE (While loop) |
| Refer to M1S3-code reference#2, the VLOC_ID is missing in the SELECT statement? | False (V_LOC_ID) |
| The INTO clause occurs between the _______ and FROM clauses. | SELECT |
| The ______ is a Boolean attribute that evaluates to TRUE if the most recent SQL statement did not return even one row. | SQL%NOTFOUND |
| The memory area allocated by Oracle server to store the SQL statement and the data that it uses in known as: | IMPLICIT CURSOR |
| What could be the possible error of the given code below? DECLARE v_sal_increase employees.salary%TYPE = 800; BEGIN UPDATE copy_emp SET salary = salary + v_sal_increase WHERE job_id = 'ST_CLERK'; END; | No error or Variable declaration |
| What could be the possible error of the given code below? DECLARE v_sal_increase employees.salary%TYPE = 800; BEGIN UPDATE copy_emp SET salary = salary + v_sal_increase WHERE job_id = 'ST_CLERK'; END; | No error |
| 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 #60 Salary Total: ' || v_sum_sal); END; | No error |
| Applying the logical operator NOT to a null yields NULL. | True |
| Refer to M1S2-code reference#3, the missing in the last case selection is v_aport > 10000. | True |
| Refer to M1S2-code reference#3, what is the missing element in the where clause? (UPPER) | UPPER |
| Refer to M1S2-code reference#1, what is the correct condition that must be supplied in the IF statement? | vpop > 1000000000 |
| Refer to M1S3-code reference#1, what value must be stored in vctr inside the loop body? ______________ Note: Do not put space in your answer. | VCTR+1 |
| The type of loop where the statement inside the loop must execute at least once. | BASIC |
| In BASIC and WHILE loop, the iteration will terminate when the counter is > than the upper bound. | False |
| A loop structure must have an exit clause. | True |
| You can change the logical flow of statements within the PL/SQL block by using: | Control structures |
| Refer to M1S3-code reference#1, what type of looping is used in the code? ________ | BASIC LOOP |
| Refer to M1S3-code reference#2, what is missing in the FOR … LOOP section? _________ | IN |
| 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 |
| An EXIT statement is used in order to come out of from the outer loop within an inner loop. | False |