0% found this document useful (0 votes)
162 views3 pages

Untitled

The DML statement: INSERT, DELETE, UPDATE make changes to the database. The SQL%ROWCOUNT is an integer value that represents the number of rows affected by the most recent SQL statement. The MERGE statement selects rows from one table to update and/or insert into another table. The SQL%FOUND is a Boolean attribute that evaluates to True if the most recent SQL statement returned at least one row. The code below must print the number of rows updated. Which part of the code must be changed to satisfy the output? Declare v_sal_increase employees.salary%type := 800; begin update copy_emp set salary = salary + v_sal_increase where job_id = ‘ST_CLER

Uploaded by

oc dhogs Tv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
162 views3 pages

Untitled

The DML statement: INSERT, DELETE, UPDATE make changes to the database. The SQL%ROWCOUNT is an integer value that represents the number of rows affected by the most recent SQL statement. The MERGE statement selects rows from one table to update and/or insert into another table. The SQL%FOUND is a Boolean attribute that evaluates to True if the most recent SQL statement returned at least one row. The code below must print the number of rows updated. Which part of the code must be changed to satisfy the output? Declare v_sal_increase employees.salary%type := 800; begin update copy_emp set salary = salary + v_sal_increase where job_id = ‘ST_CLER

Uploaded by

oc dhogs Tv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

The DML statement: INSERT, DELETE, ________ make changes to the database.

UPDATE

The _____ is an integer value that represents the number of rows affected by the most recent SQL
statement. SQL%ROWCOUNT

The _____ statement selects rows from one table to update and/or insert into another table. MERGE

The ______ is a Boolean attribute that evaluates to True if the most recent SQL statement returned at
least one row. SQL%FOUND

The code below must print the number of rows updated. Which part of the code must be changed to
satisfy the output? 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; JOB_ID

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) FROM employees WHERE department_id = v_deptno;

DBMS_OUTPUT.PUT_LINE('Dep #60 Salary Total: ' || v_sum_sal);

END; Missing INTO clause

Boolean attribute that evaluates to TRUE if the most recent SQL statement did not return even one row.
A. SQL%NOTFOUND

The use of CASE statement to test conditions such as <, >, >=, <= is know as case expression.T

Is there something missing in the given code? DECLARE

Refer to M1S2-code reference#2, the missing condition in (2) is vpop = 0. T

Control structures are used to change the logical flow of statements within the PL/SQL block. T

Refer to M1S2-code reference#3, data type for vmesg variable must be CHAR. F

The use of CASE statement to test conditions such as <, >, >=, <= is know as: Searched CASE statement

The _______ is an expression that returns true, false, or null. CONDITION

Refer to M1S2-code reference#3, what is the missing element in the where clause? (UPPER) Nothing is
missing

Refer to M1S2-code reference#1, what is that last missing element? end if;

The _______ are used to change the logical flow of statements within the PL/SQL block. Control
Structures

Refer to M1S3-code reference#1, what type of looping is used in the code? ________ BASIC LOOP

Refer to M1S3-code reference#1, what should be the initial value of vctr? 51

Refer to M1S3-code reference#2, what is missing in the SELECT statement? _________ V_LOC_ID

Refer to M1S3-code reference#2, what is missing in the FOR … LOOP section? _________ IN

Refer to M1S3-code reference#1, what should be the initial value of vctr? 51

In for loop, counter must be explicitly declared. F

A loop structure must have an exit clause. T


Refer to M1S3-code reference#2, the VLOC_ID is missing in the SELECT statement? F

In BASIC and WHILE loop, the iteration will terminate when the counter is > than the upper bound. T

In BASIC and WHILE loop, the iteration will terminate when the counter value meets the upper bound
value. T

You might also like