2013-04-21 122 views
0

我创建了一个名为temp的新用户,其密码为temp。我有另一个用户叫斯科特,这是由老虎确定。该配置文件中有三张表,我想将其复制到temp。所以,我登录到临时在这个砸出(第一个表称为ioweOracle SQL:将表格从一个用户转移到另一个用户

copy from [email protected] - create iowe - using select * from iowe;

权在此之后,当我打输入,它问我有密码。我输入tiger,并引发错误。这是它的样子:

enter image description here

所以,请告诉我,如果有从一个用户表复制到其他(我肯定有)

你的帮助是极大的赞赏方式。

回答

2

使用此语法:

CREATE TABLE temp.iowe 
    AS (SELECT * FROM scott.iowe); 

检查此链接:http://www.techonthenet.com/sql/tables/create_table2.php

还要注意,临时用户应该有权在斯科特的模式来访问数据。

编辑:

命令授予访问其他用户: 登录斯科特及以下命令来运行:

grant select, insert, update, delete on iowe to temp; 

检查此链接了解详细信息:http://www.techonthenet.com/oracle/grant_revoke.php

+0

它不工作..你能告诉我如何授予权限让临时配置文件访问Scott模式的数据吗? – 2013-04-21 06:03:02

+0

你得到的错误是什么? – Lokesh 2013-04-21 06:04:34

+0

此外,我不认为该命令从两个不同的用户配置文件复制表。即使这样做,它也不起作用。这可能是因为我不知道如何授予临时权限来访问Scott的模式。所以,请给我提供授予temp权限的命令。该链接“http://www.techonthenet.com/sql/tables/create_table2.php”没有这个信息。 – 2013-04-21 06:10:31

-1

从system/manager身份复印件@localhost到scott/tiger @ localhost使用select * from family创建系列;

相关问题