Single-Row Functions
| No. | Oracle | GaussDB |
|---|---|---|
| 1 | Supported with differences | |
| 2 | Supported with differences | |
| 3 | Supported with differences | |
| 4 | Character set functions | Not supported |
| 5 | Collation functions | Not supported |
| 6 | Supported with differences | |
| 7 | Supported with differences | |
| 8 | Supported with differences | |
| 9 | Supported with differences | |
| 10 | Collection functions | Not supported |
| 11 | Supported | |
| 12 | Data mining functions | Not supported |
| 13 | Supported with differences | |
| 14 | JSON functions | Not supported |
| 15 | Supported with differences | |
| 16 | Supported | |
| 17 | Supported with differences |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | ABS | Supported | - |
| 2 | ACOS | Supported | - |
| 3 | ASIN | Supported | - |
| 4 | ATAN | Supported | - |
| 5 | ATAN2 | Supported | - |
| 6 | BITAND | Supported | - |
| 7 | CEIL | Supported | - |
| 8 | COS | Supported | - |
| 9 | COSH | Supported | - |
| 10 | EXP | Supported | - |
| 11 | FLOOR | Supported | - |
| 12 | LN | Supported | - |
| 13 | LOG | Supported | - |
| 14 | MOD | Supported with differences |
|
| 15 | NANVL | Supported with differences | GaussDB: NaN cannot be obtained by directly declaring or dividing a floating-point number by 0. |
| 16 | POWER | Supported | - |
| 17 | REMAINDER | Supported with differences | The data types of the return values are different. GaussDB:
Oracle: Values of the NUMERIC type are returned. |
| 18 | ROUND | Supported with differences |
|
| 19 | SIGN | Supported | - |
| 20 | SIN | Supported | - |
| 21 | SINH | Supported | - |
| 22 | SQRT | Supported | - |
| 23 | TAN | Supported | - |
| 24 | TANH | Supported with differences | The data types of the return values are different. GaussDB:
Oracle: Values of the NUMERIC type are returned. |
| 25 | TRUNC | Supported | - |
| 26 | WIDTH_BUCKET | Supported | - |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | CHR | Supported with differences |
|
| 2 | CONCAT | Supported | - |
| 3 | INITCAP | Supported with differences | The return value is restricted by the database character set. As a result, the return result is inconsistent with that of the Oracle database. |
| 4 | LOWER | Supported with differences |
|
| 5 | LPAD | Supported | - |
| 6 | LTRIM | Supported with differences | The return value types are different. If the input is of the character data type, Oracle returns VARCHAR2. If the input is the national character set specified during database creation, Oracle returns NVARCHAR2. If the input is of the LOB type, Oracle returns LOB and GaussDB returns TEXT. |
| 7 | NCHR | Supported with differences |
|
| 8 | NLS_LOWER | Supported with differences |
|
| 9 | NLS_UPPER | Supported with differences |
|
| 10 | NLSSORT | Supported | - |
| 11 | REGEXP_REPLACE | Supported with differences |
|
| 12 | REGEXP_SUBSTR | Supported with differences | The matching rules are affected by the aformat_regexp_match parameter. For details about the affected specifications, see the REGEXP_SUBSTR function in "SQL Reference > Functions and Operators > Character Processing Functions and Operators" in Developer Guide. |
| 13 | REPLACE | Supported | - |
| 14 | RPAD | Supported | - |
| 15 | RTRIM | Supported | - |
| 16 | SUBSTR | Supported | - |
| 17 | TRANSLATE | Supported | - |
| 18 | TRIM | Supported | - |
| 19 | UPPER | Supported with differences |
|
| 20 | INSTRB | Supported | - |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | ASCII | Supported with differences | The return value types are different. The return type is UINT4 for Oracle and INT4 for GaussDB. |
| 2 | INSTR | Supported | - |
| 3 | LENGTH | Supported | - |
| 4 | REGEXP_COUNT | Supported with differences |
|
| 5 | REGEXP_INSTR | Supported with differences | The matching rules are affected by the aformat_regexp_match parameter. For details about the affected specifications, see the REGEXP_INSTR function in "SQL Reference" > "Functions and Operators" > "Character Processing Functions and Operators" in Developer Guide. |
| 6 | LENGTHC | Supported | - |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | ADD_MONTHS | Supported with differences |
|
| 2 | CURRENT_DATE | Supported with differences | GaussDB does not support the nls_date_format parameter for setting the time display format. |
| 3 | CURRENT_TIMESTAMP | Supported with differences | The value ranges from 0 to 9 for the Oracle database. The value ranges from 0 to 6 for GaussDB. The last zero of the microsecond is not displayed. |
| 4 | DBTIMEZONE | Supported with differences | GaussDB does not support TIMESTAMP WITH TIME ZONE. |
| 5 | EXTRACT | Supported | - |
| 6 | LAST_DAY | Supported with differences | The return value types are different. |
| 7 | LOCALTIMESTAMP | Supported with differences | The value ranges from 0 to 9 for the Oracle database. The value ranges from 0 to 6 for GaussDB. The last zero of the microsecond is not displayed. |
| 8 | MONTHS_BETWEEN | Supported with differences | The input parameter types are different. |
| 9 | NEW_TIME | Supported with differences | When the first input parameter of the new_time function is a literal, the literal format and the return value type of the function are different from those of the Oracle database. |
| 10 | NEXT_DAY | Supported | - |
| 11 | NUMTODSINTERVAL | Supported with differences | GaussDB does not support the dsinterval type. It currently supports the interval type which is compatible with the dsinterval type. |
| 12 | NUMTOYMINTERVAL | Supported with differences | GaussDB does not support the yminterval type. It currently supports the interval type which is compatible with the yminterval type. |
| 13 | SESSIONTIMEZONE | Supported with differences |
|
| 14 | SYS_EXTRACT_UTC | Supported | - |
| 15 | SYSDATE | Supported with differences | The return value types are different. |
| 16 | SYSTIMESTAMP | Supported with differences | GaussDB supports only six digits for millisecond calculation, and Oracle supports nine digits. |
| 17 | TO_CHAR | Supported with differences | fmt'5' is not in the Oracle database document and is not adapted. |
| 18 | TO_DSINTERVAL | Supported with differences | GaussDB does not support the dsinterval type. It currently supports the interval type which is compatible with the dsinterval type. |
| 19 | TO_TIMESTAMP | Supported with differences | GaussDB supports only six digits for millisecond calculation, and Oracle supports nine digits. |
| 20 | TO_TIMESTAMP_TZ | Supported with differences | The timestamptz type of GaussDB is equivalent to timestamp with local time zone of Oracle. There is no type corresponding to timestamptz of Oracle. The value of nls_date_language can only be ENGLISH or AMERICAN. |
| 21 | TO_YMINTERVAL | Supported with differences | GaussDB does not support the yminterval type. It currently supports the interval type which is compatible with the yminterval type. |
| 22 | TRUNC | Supported with differences | The type returned by GaussDB is the same as the type of the first input parameter. Oracle Database always returns the date type. In addition, the supported formats are different in the two databases. For details about the supported formats, see "SQL Reference" > "Functions and Operators > "Date and Time Processing Functions and Operators" in Developer Guide. |
| 23 | TZ_OFFSET | Supported with differences | When a time zone name is received as an input parameter, the number of time zone name types is fewer than that in the Oracle database. |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | GREATEST | Supported with differences |
|
| 2 | LEAST | Supported with differences |
|
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | ASCIISTR | Supported | - |
| 2 | CAST | Supported with differences |
|
| 3 | HEXTORAW | Supported | - |
| 4 | RAWTOHEX | Supported | - |
| 5 | TO_BINARY_DOUBLE | Supported with differences | GaussDB does not support the nlsparam parameter. |
| 6 | TO_BINARY_FLOAT | Supported with differences | GaussDB does not support the nlsparam parameter. |
| 7 | TO_BLOB | Supported with differences |
|
| 8 | TO_CLOB | Supported | - |
| 9 | TO_DATE | Supported with differences |
|
| 10 | TO_MULTI_BYTE | Supported | - |
| 11 | TO_NCHAR | Supported with differences |
|
| 12 | TO_NUMBER | Supported with differences | GaussDB does not support the NLS_PARAM parameter. The differences between the format options of GaussDB and Oracle are as follows: 1. $ GaussDB does not support the format. 2. Comma (,) GaussDB: Commas can appear anywhere in the format. Oracle:
3. B GaussDB does not support this function. 4. C GaussDB does not support the NLS parameter. 5. G GaussDB does not support the NLS parameter. 6. L GaussDB does not support the NLS parameter. 7. U GaussDB does not support the NLS parameter. 8. D GaussDB does not support the NLS parameter. 9. PR GaussDB: It is equivalent to S. A negative number is returned. Oracle:
10. RN | rn GaussDB does not support this function. TM| TM9 | TMe GaussDB does not support this function. 11. V GaussDB does not support this function. 12. FM In GaussDB, when there is FM, the comma in the format can be more than that in the original data. In other words, the number of commas is not necessarily the same. Oracle returns values with spaces before and after the value. 13. EEEE GaussDB does not support this function. |
| 13 | TO_SINGLE_BYTE | Supported | - |
| 14 | TREAT | Supported with differences | GaussDB does not support the use of the "." operator to obtain values or conversion to the object type. |
| 15 | UNISTR | Supported with differences | GaussDB supports only UTF-8 encoding, while Oracle supports UTF-8 and UTF-16 encoding. |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | EMPTY_BLOB | Supported | - |
| 2 | EMPTY_CLOB | Supported with differences | The CLOB type in GaussDB does not support the locator in Oracle. |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | EXISTSNODE | Supported with differences | If the input parameter has a namespace, aliases must be defined for both the XPath and namespace. |
| 2 | EXTRACTVALUE | Supported with differences | Currently, only XPath 1.0 is supported. |
| 3 | SYS_XMLAGG | Supported with differences | Alias of XMLAGG. You can use XMLAGG instead. |
| 4 | XMLAGG | Supported | - |
| 5 | XMLCOMMENT | Supported | - |
| 6 | XMLCONCAT | Supported | - |
| 7 | XMLELEMENT | Supported with differences | When the name field of XMLELEMENT and XMLATTRIBUTES is set to NULL, the behavior is different from that of Oracle.
|
| 8 | XMLEXISTS | Supported with differences | The input parameter of GaussDB is of the XML type. |
| 9 | XMLFOREST | Supported with differences | The return value of GaussDB is of the XML type. GaussDB does not support the EVALNAME syntax. |
| 10 | XMLPARSE | Supported with differences | The return value of GaussDB is of the XML type. GaussDB does not support the WELLFORMED syntax. |
| 11 | XMLROOT | Supported with differences | The return value of GaussDB is of the XML type. |
| 12 | JSON_OBJECT | Supported | - |
| 13 | XMLTABLE | Supported with differences | GaussDB uses XPath 1.0 expressions to select data from XML. The default namespace cannot be declared, multiple groups of input and alias cannot be obtained, the PASSING clause of the input data cannot be omitted, and the RETURNING SEQUENCE BY REF and (SEQUENCE) BY REF clauses are not supported. |
| 14 | GETSTRINGVAL | Supported | - |
| 15 | GETCLOBVAL | Supported | - |
| 16 | XMLSEQUENCE | Supported | - |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | DECODE | Supported | - |
| 2 | DUMP | Supported with differences | Due to different storage formats, the return results of the numeric and time types in GaussDB are different from those in Oracle. For example, in GaussDB, select dump(123); returns Typ=23 Len=4: 123,0,0,0. In Oracle, select dump(123) from dual; returns Typ=2 Len=3: 194,2,24. |
| 3 | ORA_HASH | Supported with differences | In GaussDB:
|
| 4 | VSIZE | Supported with differences | Due to different storage formats, the return results of the numeric and time types in GaussDB are different from those in Oracle. For example, in GaussDB, select vsize(999); returns 4. In Oracle, select vsize(999) from dual; returns 3. |
| No. | Oracle | GaussDB |
|---|---|---|
| 1 | COALESCE | Supported |
| 2 | LNNVL | Supported |
| 3 | NULLIF | Supported |
| 4 | NVL | Supported |
| 5 | NVL2 | Supported |
| No. | Oracle | GaussDB | Difference |
|---|---|---|---|
| 1 | SYS_CONTEXT | Supported with differences | GaussDB returns NULL for unsupported parameters. The following parameters are not supported:
|
| 2 | SYS_GUID | Supported | - |
| 3 | USER | Supported with differences | The return value types are different. |
| 4 | USERENV | Supported with differences | GaussDB returns NULL for unsupported parameters. The following parameters are not supported:
|
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot