数据仓库服务 GAUSSDB(DWS)-RELEASE SAVEPOINT:示例

时间:2024-10-16 16:27:28

示例

建立并随后销毁一个保存点:

1
2
3
4
5
6
7
BEGIN;
    CREATE TABLE IF NOT EXISTS table1 (a int,b int);
    INSERT INTO table1 VALUES (3);
    SAVEPOINT my_savepoint;
    INSERT INTO table1 VALUES (4);
    RELEASE SAVEPOINT my_savepoint;
COMMIT;
support.huaweicloud.com/sqlreference-dws/dws_06_0267.html