Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / Conversion Functions
 

TO_CHAR(x [, format]) converts x to a string

You can provide an optional format that indicates the format of x. The structure format depends on whether x is a number or date. The following example converts 12345.67 to a string: SQL> SELECT TO_CHAR(12345.67) FROM dual; TO_CHAR( -------- 12345.67 SQL>