Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / PL SQL Data Types
 

Compare char type value with trim

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