Static SQL Statements
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
SELECT |
Supported, with differences. |
GaussDB and Oracle Database are different in some scenarios. GaussDB: Shared locks in different transactions do not block each other in the following scenarios: SELECT FOR SHARE - SELECT FOR SHARE; SELECT FOR SHARE - SELECT FOR KEY SHARE; SELECT FOR KEY SHARE - SELECT FOR KEY SHARE; SELECT FOR KEY SHARE - SELECT FOR NO KEY UPDATE; In the preceding scenarios, because there is no blocking between locks, the lock will not be skipped when SKIP LOCKED is specified for data that has non-blocking locks in other transactions. |
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
INSERT |
Supported. |
- |
2 |
UPDATE |
Supported. |
- |
3 |
DELETE |
Supported. |
- |
4 |
MERGE |
Supported. |
- |
5 |
LOCK TABLE |
Supported. |
- |
6 |
INSERT ALL |
Supported, with differences. |
|
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
COMMIT |
Supported. |
- |
2 |
ROLLBACK |
Supported. |
- |
3 |
SAVEPOINT |
Supported. |
- |
4 |
SET TRANSACTION |
Supported, with differences. |
GaussDB does not support the NAME string and USE ROLLBACK SEGMENT rollback_segment syntax. |
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
CURRVAL and NEXTVAL |
Supported. |
- |
2 |
LEVEL |
Supported. |
- |
3 |
OBJECT_VALUE |
Not supported. |
- |
4 |
ROWID |
Not supported. |
- |
5 |
ROWNUM |
Supported, with differences. |
It is not recommended that the ROWNUM condition be used in the JOIN ON clause. In GaussDB, when the ROWNUM condition is used in the JOIN ON clause, the behavior in the LEFT JOIN, RIGHT JOIN, FULL JOIN, and MERGE INTO scenarios is different from that in other databases, causing risks in service migration. |
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
SQL%FOUND |
Supported, with differences. |
GaussDB does not update the implicit cursor result after COMMIT or ROLLBACK. Oracle Database updates the implicit cursor result after COMMIT or ROLLBACK. |
2 |
SQL%NOTFOUND |
Supported, with differences. |
|
3 |
SQL%ROWCOUNT |
Supported, with differences. |
|
4 |
SQL%ISOPEN |
Supported, with differences. |
|
5 |
SQL%BULK_ROWCOUNT |
Not supported. |
|
6 |
SQL%BULK_EXCEPTIONS |
Supported, with differences. |
No. |
Oracle Database |
GaussDB |
Difference |
---|---|---|---|
1 |
CURSOR cursor_name [ parameter_list ] RETURN return_type; |
Supported. |
- |
2 |
CURSOR cursor_name [ parameter_list ] [ RETURN return_type ] IS select_statement; |
Supported. |
- |
3 |
OPEN |
Supported. |
- |
4 |
CLOSE |
Supported, with differences. |
GaussDB is automatically closed in the exception, but Oracle Database is not automatically closed in the exception. |
5 |
FETCH |
Supported. |
- |
6 |
CURRENT OF CURSOR |
Supported. |
- |
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
SQL%FOUND |
Supported. |
2 |
SQL%NOTFOUND |
Supported. |
3 |
SQL%ROWCOUNT |
Supported. |
4 |
SQL%ISOPEN |
Supported. |
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
FOR LOOP |
Supported. |
No. |
Oracle Database |
GaussDB |
---|---|---|
1 |
Stored procedures |
Supported. |
2 |
Anonymous blocks |
Supported. |
3 |
Functions |
Supported. |
4 |
Packages |
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