更改架构名称

发布于 2024-10-07 11:17:29 字数 148 浏览 1 评论 0原文

我已经在名为 Sample1 的模式中创建了一个表,现在我想更改该表的模式名称。我尝试通过

改变模式sample2传输sample1.table1

来做到这一点,但它给了我一个错误。

如何将模式名称从sample1更改为sample2

I have created a table in a schema called sample1 and now i want to change the schema name of the table. I tried doing it by

alter schema sample2 transfer sample1.table1

But it gives me an error.

How do I change the schema name from sample1 to sample2

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

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

发布评论

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

评论(2

梦里南柯 2024-10-14 11:17:29

您是否尝试过此操作:

sp_changeobjectowner '[sample1].[transfer]', 'sample2'
go

我基于您对已创建的sample2 的其他答案所做的评论。

Did you try this:

sp_changeobjectowner '[sample1].[transfer]', 'sample2'
go

I'm basing this on the comment you made to the other answer that you already had sample2 created.

你げ笑在眉眼 2024-10-14 11:17:29

CREATE SCHEMA Sample2 开始,然后运行相同的命令。

start with CREATE SCHEMA sample2 and then run the same command.

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