Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / PL SQL Data Types
 

Compare char type value with blank space

SQL> SQL> declare   2       v_tx char(5);   3  begin   4       v_tx:='A';   5   6       if v_tx = 'A' and v_tx = 'A   ' then   7           DBMS_OUTPUT.put_line('Equal!');   8       end if;   9  end;  10  / Equal! PL/SQL procedure successfully completed. SQL>