PL/SQL variables must be declared in the declaration section or in a package as a global variable.
Example 1:
DECLARE
v_ysc varchar2(100) := ‘YourSmartCode’; ----- variable declaring and assigning value into it
BEGIN
DBMS_OUTPUT.PUT_LINE (v_ysc); ----- getting output
END;
Example 2:
DECLARE
v_ysc varchar2(100); ----- variable declaring
BEGIN
v_ysc := ‘YourSmartCode’; ----- assigning value into variable
DBMS_OUTPUT.PUT_LINE (v_ysc); ----- getting output
END;