Operators
GaussDB is basically compatible with operators in Oracle Database.
SQL Operators
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
Unary and binary operators |
Supported. |
2 |
Operator precedence |
Supported. |
Arithmetic Operators
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
Unary operators: positive (+) and negative (–). |
Supported. |
2 |
Binary operators: addition (+) and subtraction (–). |
Supported. |
3 |
Binary operators: multiplication (*) and division (/). |
Supported. |
COLLATE Operator
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
COLLATE collation_name |
Supported. |
Connection Operators
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
|| |
Supported. |
Hierarchical Query Operators
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
prior |
Supported, with differences. |
GaussDB: Only common columns can be called. Functions cannot be called. |
2 |
connect_by_root |
Supported, with differences. |
GaussDB: When connect_by_root is called, if parentheses are used to modify the operation value, the behavior is the same as that of Oracle Database. If parentheses are not used, this operator can be called only for common columns. |
3 |
connect_by_iscycle |
Supported, with differences. |
It can be used independently in GaussDB and must be used together with NOCYCLE in Oracle Database. |
4 |
start with, connect by, and level |
Supported, with differences. |
In GaussDB, start with, connect by, and level can be used as column aliases, but they cannot be used as column aliases in Oracle Database. |
5 |
start with |
Supported, with differences. |
In GaussDB, start with can be followed by an empty string for query, and the query result is empty. Operations on pseudocolumns are supported. In Oracle Database, an error is reported in these cases. |
6 |
connect by |
Supported, with differences. |
In GaussDB, connect by can be used with NULL values. In Oracle Database, an error is reported. |
Set Operators
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
union |
Supported. |
2 |
union all |
Supported. |
3 |
intersect |
Supported. |
4 |
minus |
Supported. |
Multiset Operators
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
multiset except |
Supported. |
2 |
multiset intersect |
Supported. |
3 |
multiset union |
Supported. |
User-defined Operators
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
CREATE OPERATOR |
Supported, with differences. |
|
Comparison Operators
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
< = |
Supported. |
2 |
< > |
Supported. |
3 |
> = |
Supported. |
4 |
^ = |
Supported. |
5 |
! = |
Not supported. For !=, if there is a space between an exclamation mark (!) and an equal sign (=), the exclamation mark will be identified as factorial. |
For comparison operators <=, <>, >=, and ^=, if there is a space between two symbols, it does not affect normal operations. For !=, if there is a space between an exclamation mark (!) and an equal sign (=), the exclamation mark will be identified as factorial, which may cause the result to be inconsistent with the expected result.
Feedback
Was this page helpful?
Provide feedbackThank 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