Skip to content

BINARY

  • m: This parameter defines the length of the binary string. The length can be a value from 0 to 255, and it determines the maximum number of bytes required for storing the binary string. If the input binary string is less than M bytes, it is padded with trailing zeros to match the specified length.
SELECT BINARY 'A' = 'a';
0

This SQL command is comparing the binary values of ‘A’ and ‘a’. In binary comparison, case sensitivity matters, hence the output is ‘0’ (False), indicating that ‘A’ and ‘a’ are not considered equal because one is uppercase and the other is lowercase.