tencent cloud

DokumentasiTDSQL-C for MySQL

Description of Supported Type Conversion Functions

Unduh
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-06-03 16:24:47
Diterjemahkan oleh AI
In the read-only analysis engine, performing SQL operations may result in implicit conversions caused by mismatches in field types, or explicit type conversions may be specified using the CAST function. The support for type conversions varies across different versions of the read-only analysis engine. This document will provide a detailed description of the supported type conversion.
Note:
If there are different types of values for comparison or calculation in a SQL expression, implicit conversion will be triggered. All implicit conversion logic that occurs during usage is subject to the conversion support shown in the table below. If there are operation scenarios such as comparing or calculating any value which does not support implicit conversion, an error message will be displayed, indicating that such conversion is not supported.
Syntax: CAST (expression AS data_type)
In the read-only analysis engine of version 1.2404.x, the detailed information about supported conversion types is shown in the table below.
Source/Target
Binary
Char
Date
DateTime
Decimal
Double
Float
Real
Signed
Time
Unsigned
Year
Bigint
✓
✓
×
×
✓
✓
×
✓
✓
×
✓
×
Binary
✓
×
×
×
✓
✓
×
✓
✓
×
✓
×
Date
✓
×
✓
✓
×
×
×
×
×
✓
×
×
Datetime
✓
×
✓
✓
×
×
×
×
×
✓
×
×
Decimal
✓
✓
×
×
✓
✓
×
✓
✓
×
✓
×
Double
✓
✓
×
×
✓
✓
×
✓
×
×
×
×
Float
✓
✓
×
×
✓
×
✓
✓
✓
×
✓
×
Real
✓
✓
×
×
✓
✓
×
✓
×
×
×
×
Signed
✓
✓
×
×
✓
✓
×
✓
✓
×
✓
×
Time
×
×
×
×
×
×
×
×
×
×
×
×
Unsigned
✓
✓
×
×
✓
✓
×
✓
✓
×
✓
×
Year
✓
✓
×
×
✓
✓
×
✓
✓
×
✓
×
Varchar
✓
✓
×
×
✓
✓
×
✓
✓
×
✓
×
In the read-only analysis engine of version 2.2410.x, the detailed information about supported conversion types is shown in the table below.
Source/Target
Int
/Bigint
Binary
Char
Date
DateTime
Decimal
Double
Float
Real
Signed
Time
Unsigned
Year
Int/Bigint
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Binary
✓
✓
×
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Date
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Datetime
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Decimal
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Double
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Float
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Real
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Signed
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Time
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Unsigned
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Year
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×
Varchar
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
✓
×

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan