MySQL has a BIT_LENGTH()
function that allows you to get the length of a string, measured in bits.
This function is similar to the LENGTH()
function, which returns the length of a string in bytes. The same is true for the OCTET_LENGTH()
function, which is a synonym for the LENGTH()
function.