ANSI Compliance
This statement is ANSI SQL:2011 compliant.
As an extension to ANSI, CAST permits the use of data attributes, such as the FORMAT phrase that enables alternative formatting for the numeric data.
Syntax
CAST ( character_expression AS numeric_data_type [ data_attribute [...] ] )
Syntax Elements
- character_expression
A character expression to be converted.
- numeric_data_type
- The numeric type to which character_expression is to be converted.
- data_attribute
- One of the following data attributes:
- FORMAT
- NAMED
- TITLE