使用其他表空间通过查询创建表(Oracle SQL) [英] Creating a table from a query using a different tablespace (Oracle SQL)

查看:177
本文介绍了使用其他表空间通过查询创建表(Oracle SQL)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据我开发的一些查询在数据库中创建一些表.我使用了下面的代码,它创建了表,并且效果很好.

I want to create some tables in our database from some queries I have developed. I used the code below and it created the table and it works great.

我遇到的问题显然是它使用与我们应该使用的表空间不同的表空间创建了表.有没有一种方法可以在下面的代码中指定?只是免责声明,我是数据的最终用户,所以我不像技术专家那样.

The issue I am having is apparently it created the table using a different tablespace than the one we are supposed to use. Is there a way to specify that in code like what is below? Just a disclaimer, I am more of the end user of the data so I am not as tech savy.

CREATE TABLE new_permanent_table
AS
SELECT *
FROM old_temporary_table
WHERE amount<5000;

推荐答案

假设您在另一个表空间上有一个配额,则应该只需添加"TABLESPACE< tablespace name>"即可. CREATE TABLE语句下面的语句:

Assuming that you have a quota on the other tablespace, you should be able to just add the "TABLESPACE <tablespace name>" statement below your CREATE TABLE statement:

CREATE TABLE new_permanent_table
TABLESPACE other_tablespace
AS
SELECT *
FROM old_temporary_table
WHERE amount<5000;

这篇关于使用其他表空间通过查询创建表(Oracle SQL)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆