> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# crc32

> Returns the 32-bit cyclic redundancy check (CRC) value of a string.

Returns the 32-bit cyclic redundancy check (CRC) value of a string. If the input is NULL, NULL is returned.

This function is used for error detection. It uses the CRC32 algorithm to detect changes between source and target data.

This function is supported from v3.3 onwards.

## Syntax

```Haskell theme={null}
BIGINT crc32(VARCHAR str)
```

## Parameters

`str`: the string for which you want to calculate the CRC32 value.

## Examples

```Plain Text theme={null}
mysql > select crc32("starrocks");
+--------------------+
| crc32('starrocks') |
+--------------------+
|         2312449062 |
+--------------------+

mysql > select crc32(null);
+-------------+
| crc32(NULL) |
+-------------+
|        NULL |
+-------------+
1 row in set (0.18 sec)
```

## Keywords

CRC32


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.