Oracle Conversion Functions

Conversion functions convert a value of one data type to another data type. This page summarizes conversion functions available in Oracle.

  1. ASCIISTR

    Oracle ASCIISTR() is a built-in function that returns the ASCII version of a given string in the database character set.
  2. BIN_TO_NUM

    Oracle BIN_TO_NUM() is a built-in function that returns the number converted from the bit vector specified by the arguments.
  3. CAST

    Oracle CAST() is a built-in function that converts a given argument from one type to another. This function supports both basic data types and collection types.
  4. CHARTOROWID

    Oracle CHARTOROWID() is a built-in function that converts a given string value to the ROWID data type.
  5. COMPOSE

    Oracle COMPOSE() is a built-in function that returns the result of applying Unicode normalization (as described in Unicode Standard Definition D117) to the given string parameter.
  6. CONVERT

    Oracle CONVERT() is a built-in function that converts a given string from one character set to another.
  7. DECOMPOSE

    Oracle DECOMPOSE() is a built-in function that returns the result of applying a Unicode decomposition to the given argument.
  8. HEXTORAW

    Oracle HEXTORAW() is a built-in function that converts a hexadecimal value specified as a parameter into a raw value.
  9. NUMTODSINTERVAL

    Oracle NUMTODSINTERVAL() is a built-in function that converts a given number to text in INTERVAL DAY TO SECOND format.
  10. NUMTOYMINTERVAL

    Oracle NUMTOYMINTERVAL() is a built-in function that converts a given number to INTERVAL YEAR TO MONTH text.
  11. RAWTOHEX

    Oracle RAWTOHEX() is a built-in function that converts a raw value to a character value that contains its hexadecimal representation.
  12. RAWTONHEX

    Oracle RAWTONHEX() is a built-in function that converts a raw value to a character value containing its hexadecimal representation.
  13. ROWIDTOCHAR

    Oracle ROWIDTOCHAR() is a built-in function that converts a given rowid value to VARCHAR2 type.
  14. ROWIDTONCHAR

    Oracle ROWIDTONCHAR() is a built-in function that converts a given rowid value to the VARCHAR2 data type.
  15. SCN_TO_TIMESTAMP

    Oracle SCN_TO_TIMESTAMP() is a built-in function that returns an approximate timestamp associated with a given system change number (SCN).
  16. TIMESTAMP_TO_SCN

    Oracle TIMESTAMP_TO_SCN() is a built-in function that returns an approximate system change number (SCN) associated with a given timestamp.
  17. TO_BINARY_DOUBLE

    Oracle TO_BINARY_DOUBLE() is a built-in function that converts the given expression to a double precision floating point number.
  18. TO_BINARY_FLOAT

    Oracle TO_BINARY_FLOAT() is a built-in function that converts the given expression to a binary float.
  19. TO_BLOB(bfile)

    Oracle TO_BLOB(bfile) is a built-in function that converts a BFILE value to a BLOB value.
  20. TO_BLOB(raw)

    Oracle TO_BLOB(raw) is a built-in function that converts a given LONG RAW and RAW value to a BLOB value.
  21. TO_CHAR(bfile|blob)

    Oracle TO_CHAR(bfile|blob) is a built-in function that converts BFILE or BLOB data into the database character set.
  22. TO_CHAR(character)

    Oracle TO_CHAR(character) is a built-in function that converts NCHAR, NVARCHAR2, CLOB, or NCLOB data to the database character set.
  23. TO_CHAR(datetime)

    Oracle TO_CHAR(datetime) is a built-in function that converts a given date, time, or interval value to a string based on a specified format.
  24. TO_CHAR(number)

    Oracle TO_CHAR(number) is a built-in function that converts a given numeric value to a value of the VARCHAR2 data type using an optional format parameter.
  25. TO_CLOB(bfile|blob)

    Oracle TO_CLOB(bfile|blob) is a built-in function that converts BFILE or BLOB data to the database character set and returns the data as a CLOB value.
  26. TO_CLOB(character)

    Oracle TO_CLOB(character) is a built-in function that is used to convert NCLOB values or other character strings in LOB columns to CLOB values.
  27. TO_DATE

    Oracle TO_DATE() is a built-in function that converts a given string date to a value of the DATE data type according to an optional format.
  28. TO_DSINTERVAL

    Oracle’s TO_DSINTERVAL() is a built-in function that converts a given string parameter into a INTERVAL DAY TO SECOND type value.
  29. TO_LOB

    Oracle TO_LOB() is a built-in function that converts LONG or LONG RAW values in a given column to LOB values. You can only apply this function to LONG or LONG RAW columns and only in the select list of a subquery in an INSERT statement.
  30. TO_MULTI_BYTE

    Oracle TO_MULTI_BYTE() is a built-in function that converts all single-byte characters in the given parameter to their corresponding multi-byte characters and returns a value of the same data type as the parameter.
  31. TO_NCHAR(character)

    Oracle TO_NCHAR(character) is a built-in function that converts NCHAR, NVARCHAR2, CLOB, or NCLOB data to the national character set.
  32. TO_NCHAR(datetime)

    Oracle TO_NCHAR(datetime) is a built-in function that converts the given date, time, or interval value to a string according to the specified format.
  33. TO_NCHAR(number)

    Oracle TO_NCHAR(number) is a built-in function that converts the given numeric value to a value of VARCHAR2 data type using an optional format parameter.
  34. TO_NCLOB

    Oracle TO_NCLOB() is a built-in function that converts a CLOB value in a LOB column or other character string to an NCLOB value.
  35. TO_NUMBER

    Oracle TO_NUMBER() is a built-in function that converts the given argument to a value of data type NUMBER.
  36. TO_SINGLE_BYTE

    Oracle TO_SINGLE_BYTE() is a built-in function that converts all multi-byte characters in the given argument to their corresponding single-byte characters and returns a value of the same data type as the argument.
  37. TO_TIMESTAMP

    Oracle TO_TIMESTAMP() is a built-in function that converts a given string parameter to a value of type TIMESTAMP.
  38. TO_TIMESTAMP_TZ

    Oracle TO_TIMESTAMP_TZ() is a built-in function that converts the given string argument to a TIMESTAMP WITH TIME ZONE data type.
  39. TO_YMINTERVAL

    Oracle TO_YMINTERVAL() is a built-in function that converts a given string parameter to a value of type INTERVAL MONTH TO YEAR.
  40. TREAT

    Oracle TREAT() is a built-in function used to change the declared type of an expression.
  41. UNISTR

    Oracle UNISTR() is a built-in function that returns the given character data in the national character set.
  42. VALIDATE_CONVERSION

    Oracle VALIDATE_CONVERSION() is a built-in function that is used to determine whether a given expression can be converted to a given data type.