Comparison and Ordering of JSON Values DATETIME TIME DATE BOOLEAN ARRAY OBJECT STRING INTEGER, DOUBLE NULL For JSON values of the same precedence, the comparison rules are type specific: The first  N  bytes of the two values are compared, where  N  is the number of bytes in the shorter value. If the first  N  bytes of the two values are identical, the shorter value is ordered before the longer value. Same rules as for  BLOB . Same rules as for  BLOB .  OPAQUE  values are values that are not classified as one of the other types. A value that represents an earlier point in time is ordered before a value that represents a later point in time. If two values originally come from the MySQL  DATETIME  and  TIMESTAMP  types, respectively, they are equal if they represent the same point in time. The smaller of two time values is ordered before the larger one. The earlier date is ordered before the more recent date. Two JSON arrays are equal if they have the same length and values in corresponding positions in the arrays are equal. If the arrays are not equal, their order is determined by the elements in the first position where there is a difference. The array with the smaller value in that position is ordered first. If all values of the shorter array are equal to the corresponding values in the longer array, the shorter array is ordered first. The JSON false literal is less than the JSON true literal. Two JSON objects are equal if they have the same set of keys, and each key has the same value in both objects. [] < ["a"] < ["ab"] < ["ab", "cd", "ef"] < ["ab", "ef"] • BLOB • BIT • OPAQUE • DATETIME • TIME • DATE • ARRAY • BOOLEAN • OBJECT Example: 2081