Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

DECLARE total_rows number(2); probation_count number(2); probation_min_req numbe

ID: 3772781 • Letter: D

Question

DECLARE total_rows number(2); probation_count number(2); probation_min_req number(2):=3.0; BEGIN select count(*) into probatopn_count from student where stdgpa lesser than probabtion_min_req; dbms_output.put_line(probation_count || 'students in probation'); UPDATE student SET stdgpa = stdgpa + 0.1 where stdgpa lesser tthan or equal to probabtion_min_req; IF sql percentage notfound THEN dbms_output.put_line('no students updated'); ELSIF sql percentage found THEN total_rows ;= sql percentage rowcount; dbms_output.put_line(total_rows ||'students updated'); END IF; END; / Describe what the above PL/SQL code is doing. Given the following table what will the above code print. Show the updated table after the code above is excuted.

Explanation / Answer

a) The PL/SQL code is displaying count of students below below probabtion minimum required i.e., 3.0, then it is updating the student gpa for these student by 0.1 and displaying message accordingly.

b)

StdSSN

StdLastName

StdMajor

StdClass

StdGPA

123-45-6789

WELLS

IS

FR

3.10

124-56-7890

NORBERT

FIN

JR

3.00

234-56-7890

KENDALL

ACCT

JR

3.50

StdSSN

StdLastName

StdMajor

StdClass

StdGPA

123-45-6789

WELLS

IS

FR

3.10

124-56-7890

NORBERT

FIN

JR

3.00

234-56-7890

KENDALL

ACCT

JR

3.50