©SQL :: Manager
HomeProgram InformationTechnical detailsFree downloadDonate for a cup of coffee
myway SQL Manager for MySQL and MariaDB, Download on Uptodown
SQL functionMySQLMariaDB

The CRC32 SQL Function in MySQL and MariaDB - CRC value calculation

CRC32Syntax:CRC32(String)
Return value:INTEGER
Function type:Numeric function
Function Description

The CRC32() function calculates a CRC value (Cyclic Redundancy Check) from "String" and returns an unsigned 32-bit value.

If the value of "String" is NULL, the function returns NULL.

If the argument is not a string, it is interpreted as such.

SQL Examples for the CRC32 function

 1
 2
 3
 4
 5
 6

SELECT crc32('Test');
SELECT crc32('123');
SELECT crc32(123);
SELECT crc32(null);

crc32('Test')
int(10)
2018365746
crc32('123')
int(10)
2286445522
crc32(123)
int(10)
2286445522
crc32(null)
int(10)
NULL
The examples were created with the MyWAY SQL manager: Download

How to use the CRC32() function in MySQL and MariaDB databases

The CRC32() function in MySQL and MariaDB is commonly used to generate a checksum value to verify data integrity or to identify duplicate records based on their CRC-32 checksums to identify. This can be useful in scenarios such as data synchronization, error detection or data deduplication. The CRC-32 algorithm is a hash function that produces a relatively short checksum, making it susceptible to collisions. Therefore, it is not suitable for cryptographic purposes where collision resistance is critical.
COSCOTCOUNTCRC32CURDATECURRENT_DATECURRENT_ROLE

Further MySQL und MariaDB SQL Numeric functions

BIT_COUNTBIT_COUNT(Integer)
More about BIT_COUNT Function

CEILCEIL(Number)
More about CEIL Function

CEILINGCEILING(Number)
More about CEILING Function

CRC32CCRC32C([Parameter], String)

FLOORFLOOR(Number)
More about FLOOR Function

SIGNSIGN(Number)
More about SIGN Function

ABSABS(Number)
More about ABS Function

ACOSACOS(Number)
More about ACOS Function

ASINASIN(Number)
More about ASIN Function

ATANATAN(Number [, Number2])
More about ATAN Function

ATAN2ATAN2(Number [, Number2])
More about ATAN2 Function

COSCOS(Number)
More about COS Function

COTCOT(Number)
More about COT Function

DEGREESDEGREES(Number)
More about DEGREES Function

EXPEXP(Number)
More about EXP Function

LNLN(Number)
More about LN Function

LOGLOG([Base], Number)
More about LOG Function

LOG10LOG10(Number)
More about LOG10 Function

LOG2LOG2(Number)
More about LOG2 Function

MODMOD(Number, Divider)
More about MOD Function

POWPOW(Number, Exponent)
More about POW Function

POWERPOWER(Number, Exponent)
More about POWER Function

PIPI()
More about PI Function

RADIANSRADIANS(Number)
More about RADIANS Function

RANDRAND([Number])
More about RAND Function

ROUNDROUND(Number [, Decimals])
More about ROUND Function

SINSIN(Number)
More about SIN Function

SQRTSQRT(Number)
More about SQRT Function

TANTAN(Number)
More about TAN Function

TRUNCATETRUNCATE(Number, Decimals)
More about TRUNCATE Function

Numeric functionsString functionsRegular ExpressionsDate and Time functions
Comparison functionsEncryption & CompressionConversion functionsNULL functions
Aggregate functionsWindow functionsJSON functionsGeometric functions
Sequence functionsInformation functionsDynamic ColumnsMiscellaneous functions
More information about the CRC32 SQL function: mysql.com and mariadb.com
Updated: 2023-09-24ImprintContactTerms & conditionsPrivacy & CookiesUpdatesSitemapFacebookLinkedinTwitterStatistics©2020-2024 Heino Cunze-Fischer