Updated on 2024-12-06 GMT+08:00

Data Type Comparison Rules

Data type comparison (collation) rules are followed when values of the same data type are compared (collated).

Table 1 Comparison rules

No.

Oracle Database

GaussDB

Difference

1

Numeric values

Supported.

-

2

Datetime values

Supported.

-

3

Binary values

Supported.

-

4

Character values

Supported, with differences.

  • GaussDB and Oracle Database support different comparison rules, and the names of the same comparison rules may be different.
  • GaussDB and Oracle Database differ in specifying comparison rules. For example, table-level comparison rules cannot be specified in GaussDB, but can be specified in Oracle Database.
  • GaussDB and Oracle Database differ in the syntax for specifying comparison rules. For example, in GaussDB, the ENCODING, LC_CTYPE, and LC_COLLATE parameters are used to specify the character set, character type, and comparison rules used during database creation. For details, see "SQL Reference > SQL Syntax > C > CREATE DATABASE" in Developer Guide. In Oracle Database, comparison rules at different levels are usually specified by a series of parameters with the NLS prefix.

5

Object values

Not supported.

-

6

Varrays and nested tables

Supported, with differences.

Both Oracle Database and GaussDB support the comparison of varrays. Different from Oracle Database, GaussDB not only supports the comparison of the number of elements in two varrays, but also supports the comparison between varrays of the same type.

7

Data type precedence

Supported.

-

8

Explicit/Implicit data conversion

Supported.

-