select * into dml_T_GL_AccountBalance_180105 from T_GL_AccountBalance ab where ab.FPeriodID in (select fid from T_BD_Period where FPeriodYear=2018);
delete from T_GL_AccountBalance ab where ab.FPeriodID in (select fid from T_BD_Period where FPeriodYear=2018);

本文介绍了一种使用SQL语句进行数据迁移和清理的方法。通过具体示例展示了如何将特定年份的数据迁移到新的表中,并从原始表中删除已迁移的数据。此过程对于维护数据库的整洁性和效率至关重要。
916

被折叠的 条评论
为什么被折叠?



