The results of a comparison depend on the storage classes of the operands, according to the following rules:
A value with storage class NULL is considered less than any other value (including another value with storage class NULL).
An INTEGER or REAL value is less than any TEXT or BLOB value. When an INTEGER or REAL is compared to another INTEGER or REAL, a numerical comparison is performed.
A TEXT value is less than a BLOB value. When two TEXT values are compared an appropriate collating sequence is used to determine the result.
When two BLOB values are compared, the result is determined using memcmp().