-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPLSQL_3.sql
More file actions
47 lines (43 loc) · 1.09 KB
/
Copy pathPLSQL_3.sql
File metadata and controls
47 lines (43 loc) · 1.09 KB
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
/*% USING TYPE ATTRIBUTE */
set serveroutput on
desc employees;
declare
v_type employees.job_id%type;
V_TYPE2 V_TYPE%TYPE;
v_type3 employees.job_id%type;
begin
v_type := 'IT_PROG';
V_TYPE2 := 'SA_MAN';
v_type3 := NULL;
DBMS_OUTPUT.PUT_LINE(v_type);
DBMS_OUTPUT.PUT_LINE(V_TYPE2);
DBMS_OUTPUT.PUT_LINE(V_TYPE3 || 'HELLO');
END;
---------------------%TYPE ATTRIBUTE---------------------
desc employees;
declare
V_TYPE employees.JOB_ID%TYPE;
V_TYPE2 V_TYPE%TYPE;
V_TYPE3 employees.JOB_ID%TYPE ;
begin
v_type := 'IT_PROG';
v_type2 := 'SA_MAN';
v_type3 := NULL;
dbms_output.put_line(v_type);
dbms_output.put_line(v_type2);
dbms_output.put_line('HELLO' || v_type3);
end;
---------------------------------------------------------
/* PL/SQL 4 */
------------------DELIMITERS AND COMMENTING------------------
DECLARE
V_TEXT VARCHAR2(10):= 'PL/SQL';
BEGIN
--This is a single line comment
/* This is a
multi line
comment */
--DBMS_OUTPUT.PUT_LINE(V_TEXT || ' is a good language');
null;
END;
-------------------------------------------------------------