Oracle PL/SQL - Character and string literals

Introduction

Character and string literals are enclosed by single quotes:

declare 
      v_char_tx CHAR(1):='H'; 
      v_text1_tx VARCHAR2(10) :='Hello'; 
      v_text2_CHAR(1) :=''; -- the same as NULL 
begin 
       DBMS_OUTPUT.PUT_LINE(v_text1_tx); 
end;
/

Assigning an empty string to the character variable is exactly the same as assigning NULL to it.

Related Topic