Answer:
Explanation:
There would be allaround 30 on the side.
Answer:
The code is given below
Explanation:
The correct syntax would be to place appropriate parenthesis.
(month==1?"jan":(month==2?"feb":(month==3?"mar":(month==4?"apr":(month==5?"may":(month==6?"jun":(month==7?"jul":(month==8?"aug":(month==9?"sep":(month==10?"oct":(month==11?"nov":"dec")))))))))));
Similarly, you can also use the following code:
String[] months = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" };
int month = 1;
String monthDescription = months[month - 1];
Answer:
The Anonymous Block will be:
1 DECLARE
2
3 lv_grade_row grade%rowtype;
4 lv_gr_avg grade.gr_t1%type;
5 lv_std_name varchar2(80);
6 cursor cursor_grade is select * from grade;
7
8 BEGIN
9
10 select avg(gr_t1) INTO lv_gr_avg from grade;
11 open cursor_grade;
12 fetch cursor_grade INTO lv_grade_row;
13
14 while cursor_grade%found loop
15
16 if
17 lv_grade_row.gr_t1>lv_gr_avg then lv_std_name :=
lv_grade_row.std_fname|| ' ' ||lv_grade_row.std_lname|| ' ' ||
lv_grade_row.gr_t1;
18 dbms_output.put_line(lv_std_name);
19
20 end if;
21 fetch cursor_grade into lv_grade_row;
22
Explanation: