-
Notifications
You must be signed in to change notification settings - Fork 0
/
question 1
58 lines (50 loc) · 1002 Bytes
/
question 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*set serveroutput on*/
/*begin
dbms_output.put_line('hello');
end;*/
/*nested block*/
/*begin
dbms_output.put_line('hello'||' '||'world');
begin
dbms_output.put_line('world');
end;
end;*/
/*variable type*/
/*declare
V_name varchar(10):=' students';
v_var hr.employees.job_title%type;
begin
dbms_output.put_line('hello' || V_name);
end;*/
/* creating table from schema*/
/*select * from hr.employees;
create table emp as select employee_id from hr.employees;*/
/*variable scope*/
declare
v_outer varchar(10):='outer';
begin
declare
v_outer varchar(10) :='hello';
begin
dbms_output.put_line(v_outer||' '||'in inner block');
end;
dbms_output.put_line(v_outer||' '||'in outer block');
end;
/*looping constructs
1)loop
-----
------
exit when condn
endloop;
2)while comdn loop
----------
----------
endloop
3)for i in 1:5 loop
--------
--------
endloop;*/
emp id,emp name,salary, job grade,
a=30%
b=20%
c=10%else none