Define varchar2 type variable
SQL>
SQL> set serverout on
SQL>
SQL> declare
2 l_text varchar2(100);
3 begin
4 l_text := 'Hello, World!';
5 dbms_output.put_line(l_text);
6 exception
7 when others then
8 dbms_output.put_line('We encountered an exception!');
9 raise;
10 end;
11 /
Hello, World!
PL/SQL procedure successfully completed.
SQL>
Related examples in the same category