检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
Exercise caution when using the DELETE statement to delete a single element. Otherwise, the element sequence may be incorrect.
To add or delete users in an existing role, use ALTER ROLE. To delete a role, use DROP ROLE. DROP ROLE deletes only a role, rather than member users in the role. Built-in Roles GaussDB provides a group of default roles whose names start with gs_role_.
Step 2: Delete Table Data Delete the instance. Step 3: Restore Table Data Restore the deleted table data using a table-level backup. Step 4: Check the Restoration Result Log in to the DAS console and check whether data is restored.
Run the following SQL statement to delete table data: DELETE FROM myschema.mytable WHERE firstcol = 100; Step 3: Restore Table Data Log in to the management console. Click in the upper left corner and select a region and project.
Manually delete audit logs. Run the pg_delete_audit command to manually delete the audit records generated during a specified period of time.
the scheduled tasks. test_event=# DROP EVENT event_e2; test_event=# DROP EVENT test.event_e3; -- Delete the table. test_event=# DROP TABLE t_ev; -- Delete a schema. test_event=# DROP SCHEMA test; -- Switch back to the initial database and delete the test database.
action ] [ ON UPDATE action ] You can run REFERENCES reftable[(refcolumn)] [MATCH FULL |MATCH PARTIAL | MATCH SIMPLE] [ON DELETE action] [ON UPDATE action] to create foreign key constraints for tables.
RESTRICT: refuses to delete the server if any objects depend on it. This is the default action.
Value range: an existing role name Examples -- Create role role11. gaussdb=# CREATE ROLE role11 PASSWORD '********'; CREATE ROLE -- Delete role role11. gaussdb=# DROP ROLE IF EXISTS role11; DROP ROLE -- Delete role role12 that does not exist. gaussdb=# DROP ROLE IF EXISTS role12
RESTRICT: refuses to delete the server if any objects depend on it. This is the default action.
Value range: an existing role name Examples -- Create role role11. gaussdb=# CREATE ROLE role11 PASSWORD '********'; CREATE ROLE -- Delete role role11. gaussdb=# DROP ROLE IF EXISTS role11; DROP ROLE -- Delete role role12 that does not exist. gaussdb=# DROP ROLE IF EXISTS role12
the application mapping group. openGauss=# DROP APP WORKLOAD GROUP MAPPING app_wg_map1; -- Delete the workload group. openGauss=# DROP WORKLOAD GROUP wg_hr1; -- Delete the resource pool. openGauss=# DROP RESOURCE POOL pool1; Helpful Links CREATE APP WORKLOAD GROUP MAPPING and
Replace init_user with the actual initial username. gaussdb=# \c - init_user -- Delete user sysadmin. gaussdb=# DROP USER sysadmin; Helpful Links CREATE SYNONYM and DROP SYNONYM Parent topic: SQL Syntax
FOR SHARE/UPDATE is used to lock rows in a transaction, other transactions cannot modify or delete these rows. When FOR SHARE is used to lock a row, the current transaction and other transactions cannot modify or delete the locked row.
After an object is created, only the object owner or system administrators can query, modify, and delete the object, and grant permissions for the object to other users through GRANT by default.
After an object is created, only the object owner or system administrators can query, modify, and delete the object, and grant permissions for the object to other users through GRANT by default.
After an object is created, only the object owner or system administrators can query, modify, and delete the object, and grant permissions for the object to other users through GRANT by default.
After an object is created, only the object owner or system administrator can query, modify, and delete the object, and grant permissions for the object to other users through GRANT by default.
FROM ledgernsp.usertable WHERE id = 3; DELETE 1 gaussdb=# SELECT *, hash_69dd43 FROM ledgernsp.usertable ORDER BY id; id | name | hash_69dd43 ----+------+------------------ 1 | alex | 1f2e543c580cb8c5 2 | bob2 | 437761affbb7c605 (2 rows) Delete tables and schemas.
FROM ledgernsp.usertable WHERE id = 3; DELETE 1 gaussdb=# SELECT *, hash_69dd43 FROM ledgernsp.usertable ORDER BY id; id | name | hash_69dd43 ----+------+------------------ 1 | alex | 1f2e543c580cb8c5 2 | bob2 | 437761affbb7c605 (2 rows) Delete tables and schemas.