# Cast Function
__*CAST function*__
+ Syntax:
  + **`CAST({expression} AS TYPE)`** 
+ The **`CAST`** function converts a value of any type to a value of the specified type. The target type can be one of the following types: 
  + **`BINARY`**, **`CHAR`**, **`DATE`**, **`DATETIME`**, **`TIME`**, **`DECIMAL`**, **`SIGNED`**, **`UNSIGNED`** 
+ For example:

```
tidb> SELECT CAST(' ' AS BINARY), BINARY(' ');
+------------------------------------------+--------------------------+
| CAST(' ' AS BINARY)                      | BINARY(' ')              |
+------------------------------------------+--------------------------+
| 0x20                                     | 0x20                     |
+------------------------------------------+--------------------------+
1 row in set (0.00 sec)
```

------------------------------------------------------------
- Cast function and operator table
  - `BINARY`: Converts a string to a binary string
  - `CAST()`: Converts a value to a determinate type
  - `CONVERT()`: Converts a value to a determinate type
