File tree 2 files changed +59
-0
lines changed
docs/sqlstatement/numeric-functions
2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ id : numeric-crc32
3
+ title : CRC32
4
+ ---
5
+
6
+ Returns the CRC32 checksum of a string.
7
+
8
+ ## Syntax
9
+
10
+ ``` sql
11
+ CRC32(x)
12
+ ```
13
+
14
+ ## Arguments
15
+
16
+ | Arguments | Description |
17
+ | ----------- | ----------- |
18
+ | x | The argument is expected to be a string and (if possible) is treated as one if it is not. |
19
+
20
+ ## Return Type
21
+
22
+ UInt32.
23
+
24
+ ## Examples
25
+
26
+ ```
27
+ mysql> SELECT CRC32('MySQL');
28
+ +----------------+
29
+ | CRC32('MySQL') |
30
+ +----------------+
31
+ | 3259397556 |
32
+ +----------------+
33
+ 1 row in set (0.09 sec)
34
+
35
+ mysql> SELECT CRC32('mysql');
36
+ +----------------+
37
+ | CRC32('mysql') |
38
+ +----------------+
39
+ | 2501908538 |
40
+ +----------------+
41
+ 1 row in set (0.01 sec)
42
+
43
+ mysql> SELECT CRC32(NULL);
44
+ +-------------+
45
+ | CRC32(NULL) |
46
+ +-------------+
47
+ | NULL |
48
+ +-------------+
49
+ 1 row in set (0.00 sec)
50
+
51
+ mysql> SELECT CRC32(12);
52
+ +------------+
53
+ | CRC32(12) |
54
+ +------------+
55
+ | 1330857165 |
56
+ +------------+
57
+ 1 row in set (0.01 sec)
58
+ ```
Original file line number Diff line number Diff line change 202
202
- COS : sqlstatement/numeric-functions/cos.md
203
203
- TAN : sqlstatement/numeric-functions/tan.md
204
204
- COT : sqlstatement/numeric-functions/cot.md
205
+ - CRC32 : sqlstatement/numeric-functions/crc32.md
205
206
- String Functions :
206
207
- SUBSTRING : sqlstatement/string-functions/substring.md
207
208
- Test Functions :
You can’t perform that action at this time.
0 commit comments