Skip to content

Commit

Permalink
Merge pull request matrixorigin#146 from yanghaitao5000/patch-4
Browse files Browse the repository at this point in the history
Update cast.md
  • Loading branch information
dengn authored Nov 13, 2023
2 parents fdc985b + ab2b466 commit 8ab56d1
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ mysql> SELECT CAST(a AS FLOAT) a_cast,CAST(b AS UNSIGNED) b_cast,CAST(c AS SIGNE
+--------+--------+--------+--------+
| a_cast | b_cast | c_cast | d_cast |
+--------+--------+--------+--------+
| 1.0000 | 1 | 1 | -2 |
| 1 | 2 | 1 | -2 |
+--------+--------+--------+--------+
1 row in set (0.01 sec)

mysql> SELECT CAST(a AS CHAR) a_cast, CAST(b AS CHAR) b_cast,CAST(c AS DOUBLE) c_cast, CAST(d AS FLOAT) d_cast from t1;
+--------+--------+--------+---------+
| a_cast | b_cast | c_cast | d_cast |
+--------+--------+--------+---------+
| 1 | 1.5 | 1.0000 | -2.0000 |
+--------+--------+--------+---------+
+--------+--------+--------+--------+
| a_cast | b_cast | c_cast | d_cast |
+--------+--------+--------+--------+
| 1 | 1.5 | 1 | -2 |
+--------+--------+--------+--------+
1 row in set (0.00 sec)
```

## **限制**
Expand Down

0 comments on commit 8ab56d1

Please sign in to comment.