CAST
Purpose
Converts an expression into the specified data type. If this is not possible, then an exception is thrown.
Syntax
cast::=
Usage Notes
- CONVERT is an alias for this function.
- For information about data types and the conversion rules, refer to Type Conversion Rules.
Examples
SELECT CAST('ABC' AS CHAR(15)) STRINGCAST;
SELECT CAST('2006-01-01' AS DATE) DATECAST;