Home > database >  About by date to delete data in a table
About by date to delete data in a table

Time:05-20

Of a project, the table name ts_sif_dat01, created the largest space change table is 32 gb, use 29%, now want to on May 20, 2020, delete data, before the great god, please give directions, this is the most optimal method, the SQL statement is as follows:
1, the create table ts_sif_dat01_back as select * from ts_sif_dat01 where sys_time & gt;='2020-05-20';
2, the select * from table ts_sif_dat01_back;
3, the drop table ts_sif_dat01:
4, the alter ts_sif_dat01_back rename to ts_sif_dat01;
Please correct me everyone a great god,

CodePudding user response:

I am a little white, you great god see if there is something wrong with the statement itself, a great god, please give advice,

CodePudding user response:

I am a little white, you great god see if there is something wrong with the statement itself, a great god, please give advice,
  • Related