Skip to main content


UNICODEORDER( left, right [, locale ] )

leftThe left Unicode expression to evaluate.
rightThe right Unicode expression to evaluate.
localeOptional. A string constant containing a valid locale code, as specified in ISO standards 639 and 3166.
Return:UNICODEORDER returns a single value.

The UNICODEORDER function returns either -1, 0, or 1 depending on the evaluation of the left and right expressions. This is equivalent to the <=> equivalence comparison operator but taking the unicode locale as the basis of determination. If left < right then -1 is returned, if left = right then 0 is returned, if left > right then 1 is returned.


  UNICODE1 x := u'a';
  UNICODE1 y := u'b';
  UNICODE1 z := u'a';
  a := UNICODEORDER(x , y, 'es'); // returns -1
  b := UNICODEORDER(x , z, 'es'); // returns 0
  c := UNICODEORDER(y , z, 'es'); // returns 1