Home  >  Article  >  Database  >  How MySQL implements type conversion

How MySQL implements type conversion

WBOY
WBOYforward
2023-04-17 15:01:051033browse

Type conversion

Command: CAST(expr AS type)

Function: Mainly used for display type conversion

Application scenario: display type Conversion

Example:

mysql> select cast(18700000000 as char);
+---------------------------+
| cast(18700000000 as char) |
+---------------------------+
| 18700000000  |
+---------------------------+
1 row in set (0.00 sec)

It should be noted that type does not support all basic data types

The above is the detailed content of How MySQL implements type conversion. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete