1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
SELECT CAST("12" AS SIGNED);
CAST("12" AS SIGNED)
12
SELECT CAST(12 AS SIGNED);
CAST(12 AS SIGNED)
12
SELECT CAST(0 AS SIGNED);
CAST(0 AS SIGNED)
0
SELECT CAST("0" AS SIGNED);
CAST("0" AS SIGNED)
0
SELECT CAST(0.0 AS SIGNED);
CAST(0.0 AS SIGNED)
0
SELECT CAST(0.1 AS SIGNED);
CAST(0.1 AS SIGNED)
0
SELECT CAST(0.4 AS SIGNED);
CAST(0.4 AS SIGNED)
0
SELECT CAST(0.5 AS SIGNED);
CAST(0.5 AS SIGNED)
1
SELECT CAST(0.9 AS SIGNED);
CAST(0.9 AS SIGNED)
1
SELECT CAST(10.1 AS SIGNED);
CAST(10.1 AS SIGNED)
10
SELECT CAST("18446744073709551615" AS SIGNED);
ERROR HY000: Invalid cast to signed integer: 18446744073709551615
SELECT CAST(18446744073709551615 AS SIGNED);
ERROR HY000: Invalid cast to signed integer: 18446744073709551615
SELECT CAST(-1 AS SIGNED);
CAST(-1 AS SIGNED)
-1
SELECT CAST(-18446744073709551614 AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551614
SELECT CAST(-18446744073709551615 AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551615
SELECT CAST("-1" AS SIGNED);
CAST("-1" AS SIGNED)
-1
SELECT CAST("-18446744073709551614" AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551614
SELECT CAST("-18446744073709551615" AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551615
SELECT CAST(-1.1 AS SIGNED);
CAST(-1.1 AS SIGNED)
-1
SELECT CAST(-18446744073709551614.1 AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551614.1
SELECT CAST(-18446744073709551615.1 AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551615.1
SELECT CAST("-1.1" AS SIGNED);
CAST("-1.1" AS SIGNED)
-1
SELECT CAST("-18446744073709551614.1" AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551614.1
SELECT CAST("-18446744073709551615.1" AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -18446744073709551615.1
SELECT CAST(9223372036854775807 AS SIGNED);
CAST(9223372036854775807 AS SIGNED)
9223372036854775807
SELECT CAST(9223372036854775808 AS SIGNED);
ERROR HY000: Invalid cast to signed integer: 9223372036854775808
SELECT CAST(-9223372036854775809 AS SIGNED);
ERROR HY000: Invalid cast to signed integer: -9223372036854775809
SELECT CAST(-9223372036854775808 AS SIGNED);
CAST(-9223372036854775808 AS SIGNED)
-9223372036854775808
SELECT CAST(-9223372036854775807 AS SIGNED);
CAST(-9223372036854775807 AS SIGNED)
-9223372036854775807
SELECT CAST(-9223372036854775806 AS SIGNED);
CAST(-9223372036854775806 AS SIGNED)
-9223372036854775806
SELECT CAST(-9223372036854775805 AS SIGNED);
CAST(-9223372036854775805 AS SIGNED)
-9223372036854775805
|