Updated on 2024-11-11 GMT+08:00

Expressions

GaussDB is compatible with most database expressions.

Table 1 Expressions

No.

Oracle Database

GaussDB

Difference

1

Simple expressions

Supported.

-

2

Analytic view expressions

Not supported.

-

3

Compound expressions

Supported.

-

4

CASE expressions

Supported.

-

5

Column expressions

Supported.

-

6

CURSOR expressions

Not supported.

-

7

Datetime expressions

Supported, with differences.

GaussDB command output does not contain time zone information, but Oracle Database contains time zone information similar to "PM AMERICA/LOS_ANGELES."

8

Function expressions

Supported.

-

9

Interval expressions

Partially supported.

GaussDB supports statements in the format of "SELECT INTERVAL '999999999 23:59:59.999' day(9) to second FROM DUAL;" but does not support statements in the format of "SELECT(SYSDATE-SYSDATE) DAY TO SECOND FROM DUAL;". They are supported in Oracle Database.

10

JSON object access expressions

Partially supported, with differences.

  • GaussDB can extract values from JSON objects in "->'key'" mode, while Oracle Database can extract values in ".key" mode.
  • For JSONARRY objects, Oracle Database can extract values corresponding to all keys at a time in ".key" mode. However, GaussDB does not support this function.

11

Model expressions

Not supported.

-

12

Object expressions

Not supported.

-

13

Placeholder expressions

Partially supported.

GaussDB supports general placeholder expressions such as ":var", but does not support the combination of two general placeholder expressions using the INDICATOR keyword.

14

Scalar subquery expressions

Supported.

-

15

Type constructor expressions

Partially supported.

GaussDB cannot specify the NEW keyword before the type constructor, but Oracle Database can.

16

Expression lists

Supported.

-