Professional Documents
Culture Documents
Procedure created.
Procedure created.
SQL> PRINT T
T
---------99
16 dbms_output.put_line(c);
17 end if;
18 else d:=mod(b,a); if(d=0)
19 then
20 dbms_output.put_line('GCD is');
21 dbms_output.put_line(a);
22 else
23 dbms_output.put_line('GCD is');
24 dbms_output.put_line(d);
25 end if;
26 end if;
27 end;
28 /
Enter value for a: 8
old 7: a:=&a;
new 7: a:=8;
Enter value for b: 16
old 8: b:=&b;
new 8: b:=16;
Procedure created.
*
ERROR at line 1:
ORA-00907: missing right parenthesis
Table created.
1 row created.
1 row created.
1 row created.
REGNO NAME
MARK1
MARK2
MARK3
78
88
77
60
99
77
69
81
89
102 surya
99
103 suryapriya
91
SQL> declare
2 ave number(5,2);
3 tot number(3);
100
90
97
89
MARK4
11 ave:=tot/5;
12 dbms_output.put_line(student.regno||rpad(student.name,15)
13 ||rpad(student.mark1,6)||rpad(student.mark2,6)||rpad(student.mark3,6)
14 ||rpad(student.mark4,6)||rpad(student,mark5,6)||rpad(tot,8)||rpad(ave,5));
15 end loop;
16 end;
17 /