The series will be sorted out later.
--------------------
Clear table data:
Problem:
Truncate table is not in DB2. You can use the following procedure.
Call sysproc. admin_cmd ('Load from NUL of del replace into ahsimis. ac01_temp ');
Commit;
After a table is called, it may be inactive. Use the following command to activate the table.
Problem:
Sqlstate 57016: the table cannot be accessed because it is not active.
DB2 load query table test. Users
Tablestate:
Check pending
DB2 set integrity for test. Users immediate checked
---------------------
Renaming a table
Sqlstate = 42986
Check whether any index or constraint exists. Delete it first.
Connect to ahsimis user "user ";
Alter table ahsimis. ac01_temp drop check sys_c00249228 drop check sys_c00249229;
Connect reset;
Then rename
Connect to ahsimis;
Rename table ahsimis. ac01_temp to ac01;
Connect reset;
---------------------
Submit
In DB2, whether it is DML or DDL, a commit command is required. Otherwise, the command does not take effect.