Help Center > > Developer Guide> Stored Procedures> Data Type Conversion

Data Type Conversion

Updated at: Jul 15, 2020 GMT+08:00

Certain data types in the database support implicit data type conversions, such as assignments and parameters invoked by functions. For other data types, you can use the type conversion functions provided by DWS, such as the CAST function, to forcibly convert them.

Table 1 lists common implicit data type conversions in DWS.

The valid value range of DATE supported by DWS is from 4713 B.C. to 294276 A.D.

Table 1 Implicit data type conversions

Raw Data Type

Target Data Type

Remarks

CHAR

VARCHAR2

-

CHAR

NUMBER

Raw data must consist of digits.

CHAR

DATE

Raw data cannot exceed the valid date range.

CHAR

RAW

-

CHAR

CLOB

-

VARCHAR2

CHAR

-

VARCHAR2

NUMBER

Raw data must consist of digits.

VARCHAR2

DATE

Raw data cannot exceed the valid date range.

VARCHAR2

CLOB

-

NUMBER

CHAR

-

NUMBER

VARCHAR2

-

DATE

CHAR

-

DATE

VARCHAR2

-

RAW

CHAR

-

RAW

VARCHAR2

-

CLOB

CHAR

-

CLOB

VARCHAR2

-

CLOB

NUMBER

Raw data must consist of digits.

INT4

CHAR

-

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel