切换分区
是否可以通过一个查询一次切换多个分区?
我在一个表中有700个分区,我想用一个查询切换到其相应的表。
我尝试编写此查询
DECLARE @num INT = 1
WHILE @num <= 700
BEGIN
ALTER TABLE SourceTable
SWITCH TO DestinationTable PARTITION @num
SET @num = @num +1
END
Is it possible to switch more than one partition at once with one query?
I have 700 partitions in a table that I want to switch to its corresponding table with one query.
I tried writing this query
DECLARE @num INT = 1
WHILE @num <= 700
BEGIN
ALTER TABLE SourceTable
SWITCH TO DestinationTable PARTITION @num
SET @num = @num +1
END
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论