PLSQL 2
PLSQL 2
31m
Autocomplete
left Oracle
not
supported
1. Xplore 1- Find total score
ALL 1 SET NULL "NULL"; ⋯
11 declare
Write a PL/SQL anonymous block to find 12 s Scores.Score%type;
the summation of all scores in the Score 13 cursor c is select sum(Score)
table which are not greater than 100. 14 begin
15 open c;
1 The structure of the Scores table is as 16 fetch c into s;
below: 17 dbms_output.put_line('Total='
Scores( Score Number(3)); 18 close c;
19 end;
/
Example: 20 /
If the Scores table has following data 21 exit;
Score
120
30
40
50
150
Line: 20 Col: 2
Output :
Total=120 Test Run Submit
Results Query Code
https://www.hackerrank.com/test/4pbefb37jt2/questions/ghdq3932ods 1/1