Data Type Comparison Rules
Data type comparison (collation) rules are followed when values of the same data type are compared (collated).
No. |
Oracle |
GaussDB |
Difference |
Rule Description |
---|---|---|---|---|
1 |
Numeric values |
Supported. |
- |
For comparison based on numeric values, a number close to the positive direction of a number axis is greater than a number close to the negative direction of the number axis, for example, 5 > 3, 1 > –1, and –1 > –2. |
2 |
Datetime values |
Supported. |
- |
For comparison based on datetime values, the later date or timestamp is greater than the earlier date or timestamp, for example, '2000-01-01 12:00:00' > '2000-01-01 11:59:59'. |
3 |
Binary values |
Supported. |
- |
For comparison based on binary values, a number close to the positive direction of a number axis is greater than a number close to the negative direction of the number axis, for example, 1001 0101 > 1001 0011. |
4 |
Character values |
Supported, with differences. |
|
- |
5 |
Object values |
Not supported. |
- |
- |
6 |
Varrays and nested tables |
Supported, with differences. |
Both Oracle and GaussDB support the comparison of varrays. Different from Oracle, 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. |
- |
- |
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