1、attach
db2 "alter table test attach partition part1 starting '01/01/2016' ending '31/12/2016' from table test_part1"
db2 commint
db2 set integrity for test immediate checked
db2 commit
2、detach
db2 alter table test detach partition part1 into table test_part1
db2 commit
db2 "alter table test attach partition part1 starting '01/01/2016' ending '31/12/2016' from table test_part1"
db2 commint
db2 set integrity for test immediate checked
db2 commit
2、detach
db2 alter table test detach partition part1 into table test_part1
db2 commit
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26224914/viewspace-2122734/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26224914/viewspace-2122734/
本文介绍了如何使用DB2进行表分区的附加(attach)和分离(detach)操作。通过具体的SQL命令示例,展示了如何将一个分区从现有表中分离为单独的表,以及如何将一个独立的分区表重新附加回原始表的具体步骤。
2171

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



