Chapter 4: SQL Language Elements
4.9.2.90 TO_NUMBER function (extension)
Syntax
TO_NUMBER ( char_expression )
Description
The scalar function TO_NUMBER converts the given character expression to a number value.
Example
SELECT *
FROM customer
WHERE TO_NUMBER (SUBSTR (phone, 1, 3)) = 603 ;
Notes
- The argument to the function must be of type CHARACTER.
- The result is of type NUMERIC.
- If any of the argument expressions evaluates to null, the result is null.