السلام عليكم استاذنا الكبير تامر نبيل
انا متابع مجهودك الرائع فى الدروس التى تقوم بها واتمنى ان تقوم بتكلمه باقى الاجزاء بنفس التوصيح
وسوف اقوم بمحاوله الحل على الاسئله وارجو التصحيح اذا وجدت خطا وشكرا على مجهودك
والحل هو
set serveroutput on
declare
father_name varchar2(20):='patrick';
date_of_birth date:='20-4-1972';
begin
declare
child_name varchar2(20):='mike';
date_of_birth date:='12-12-2002';
begin
dbms_output.put_line('father''s name:'||father_name);
dbms_output.put_line('date_of_birth:'||date_of_bir th);
dbms_output.put_line('declrechild''sname:'||child_ name);
end;
dbms_output.put_line('date of birth: '|| date_of_birth);
end;
father's name:patrick
date_of_birth:12/12/02
child'sname:mike
date of birth: 20/04/72
PL/SQL procedure successfully completed.
set serveroutput on
<<outer>>
declare
sal number(7,2):=6000;
comm number(7,2):=sal*0.20;
message varchar2(255):='eligible for commission';
begin
declare
sal number(7,2):=5000;
comm number(7,2):=0;
total_comp number(7,2):=sal+comm;
begin
message:='clerk not'||message ;
dbms_output.put_line(message);
outer.comm:=sal*.30;
dbms_output.put_line(comm);
dbms_output.put_line(outer.comm);
end;
dbms_output.put_line(comm);
message:='salesman'||message;
dbms_output.put_line(message);
end;
clerk noteligible for commission
error because total_comp at position2
0
1500
1500
salesmanclerk noteligible for commission
PL/SQL procedure successfully completed
المفضلات