SQL>
SQL> SET ECHO ON
SQL> SET SERVEROUTPUT ON
SQL> DECLARE
2 d1 DATE;
3 cd1 VARCHAR2(10);
4 cd2 VARCHAR2(10);
5 n1 NUMBER;
6 cn1 VARCHAR2(10);
7 cn2 VARCHAR2(10);
8 BEGIN
9 cn1 := '995';
10 n1 := cn1 + .99 ;
11 cn2 := n1;
12
13 DBMS_OUTPUT.PUT_LINE('CN1 = ' || cn1);
14 DBMS_OUTPUT.PUT_LINE('N2 = ' || n1);
15 DBMS_OUTPUT.PUT_LINE('CN2 = ' || cn2);
16 END;
17 /
CN1 = 995
N2 = 995.99
CN2 = 995.99
PL/SQL procedure successfully completed.
SQL>
SQL>
|