在 Oracle 中合并

发布于 2024-08-24 05:18:49 字数 32 浏览 4 评论 0原文

如何在 Oracle 中合并表以及它的语法是什么?

How to coalesce a table in oracle and What is it's syntax ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

三生一梦 2024-08-31 05:18:49

我最初怀疑您是在询问合并表空间:

alter tablespace mytablespace coalesce;

这将连续的范围组合成更大的范围。请参阅 Oracle 10G 文档

但现在我想也许您正在寻找的是

alter table mytable shrink space compact;

中详细描述的 Thiis这篇 Oracle 杂志文章

I originally suspected that you were asking about coalescing tablespaces:

alter tablespace mytablespace coalesce;

This combines contiguous extents into larger extents. See Oracle 10G Docs

But now I think perhaps what you are looking for is

alter table mytable shrink space compact;

Thiis described in detail in this Oracle Magazine article.

游魂 2024-08-31 05:18:49

coalesce 是一个函数,它接受两个(或更多)参数并返回第一个不为 null 的参数。

给定一个带有可为空列(例如,Age)的表,您可以编写以下内容:

select coalesce(Age, 18) from MyTable;

coalesce is a function that takes two (or more) parameters and return the first that is not null.

Given a table with a nullable column called, say, Age, you could write the following:

select coalesce(Age, 18) from MyTable;
兔小萌 2024-08-31 05:18:49

如果我明白你想要做什么,你需要:

ALTER TABLE blah MOVE TABLESPACE different-tablespace;

然后将其移回:

ALTER TABLE blah MOVE TABLESPACE original-tablespace;

If I understand what you're trying to do, you'll need to:

ALTER TABLE blah MOVE TABLESPACE different-tablespace;

then move it back:

ALTER TABLE blah MOVE TABLESPACE original-tablespace;
风吹雪碎 2024-08-31 05:18:49

本文档非常清楚地解释了如何我们使用合并。

This documentation is very clear on explaining how we use COALESCE.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文