m1s2 Reference
m1s2 Reference
declare
vpop ___________.population%type;
begin
if ______________ then
else
_______
end;
2.) Modify the code given in #1 so that it handles all the following cases:
▪ Population is greater than 1 billion.
▪ Population is greater than 0.
▪ Population is 0.
▪ Population is null. (Display: No data for this country.)
Assumptions:
- Variable vpop has been properly declared at the declaration section.
- Implicit cursor has been created to store a value to vpop.
declare
begin
. . . . . . . .
. . . . . . . .
elsif ____(2)____then
dbms_output.put_line('Population = 0');
if _____________ then
end if;
end if;
end;
3.) Write a PL/SQL block to find the number of airports from the countries table for a supplied country_name.
Based on this number, display a customized message as follows:
Supply the missing elements of the given below to satisfy the above statement.
declare
v_aport countries.airports%type;
vmesg __________(50);
begin
case
else
this country';
end;
dbms_output.put_line(vmesg);
end;