检测到您已登录华为云国际站账号,为了您更好的体验,建议您访问国际站服务网站 https://www.huaweicloud.com/intl/zh-cn
不再显示此消息
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.
RESTRICT: refuses to delete the synonym if any objects depend on it. This is the default action.
If you directly delete the frozen instance, its automated backups will also be deleted and the backup space will not be billed any longer. Parent topic: Backup and Restoration
A valid command is one of the SELECT, INSERT, UPDATE, and DELETE statements.
You can see 3 and 4 at the same time. gaussdb=# SELECT * FROM tpcds.table1; a --- 3 4 (2 rows) -- Delete the table. gaussdb=# DROP TABLE tpcds.table1; -- Delete a schema. gaussdb=# DROP SCHEMA tpcds CASCADE; Helpful Links SAVEPOINT and ROLLBACK TO SAVEPOINT Parent topic: R
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: A
the savepoint. gaussdb=# RELEASE SAVEPOINT my_savepoint; -- Commit the transaction. gaussdb=# COMMIT; -- Query the table content, which should contain both 3 and 4. gaussdb=# SELECT * FROM tpcds.table1; -- Delete the table. gaussdb=# DROP TABLE tpcds.table1; -- Delete a schema
Delete columns. Rename columns. Set and delete default values of columns. Change column lengths. Change column precisions. Change column types. Change definitions of ENUM/SET columns. When data needs to be reorganized, the time required depends on the data volume.
RESTRICT: refuses to delete the synonym if any objects depend on it. This is the default 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.
] 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 aggregate function if any objects depend on it. This is a default processing.
RESTRICT Refuses to delete the aggregate function if any objects depend on it. This is a default processing.
For example, run the following command to delete an empty schema named nullschema: 1 2 openGauss=# DROP SCHEMA IF EXISTS nullschema; DROP SCHEMA To delete a schema that is not null, use the keyword CASCADE to delete it and all its objects.
For example, run the following command to delete an empty schema named nullschema: 1 2 openGauss=# DROP SCHEMA IF EXISTS nullschema; DROP SCHEMA To delete a schema that is not null, use the keyword CASCADE to delete it and all its objects.
data from the PLAN_TABLE table and delete tables foo1 and foo2. gaussdb=# DELETE FROM plan_table WHERE STATEMENT_ID = 'TPCH-Q4'; gaussdb=# DROP TABLE foo1; gaussdb=# DROP TABLE foo2; Parent topic: E
a public database link. ora_test_db=# DROP PUBLIC DATABASE LINK public_dblink; -- Delete the user. ora_test_db=# RESET ROLE; ora_test_db=# DROP USER user01; ora_test_db=# DROP USER user2; -- Switch back to the initial database and delete the test database.
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: A
a public database link. ora_test_db=# DROP PUBLIC DATABASE LINK public_dblink; -- Delete the user. ora_test_db=# RESET ROLE; ora_test_db=# DROP USER user01; ora_test_db=# DROP USER user2; -- Switch back to the initial database and delete the test database.