同用户下的对象是不能具有相同的名字的 1,复制表结构: create table a as select * from b where 1=2; 2,复制表和数据:create table a as select * From b ; 3,移动表所属的表空间:alter table a move tablespace 表空间名;
2楼的方法也可以create table tb as select * from table1 tablespace 表空间B;
不同表空间对应不同用户,如:A表空间对应A用户,B表空间对应B用户,表为C 则可以 create table A.C as select * from B.C
如create table EMP
(
EMPNO NUMBER(4) not null,
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
MGR NUMBER(4),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2)
)
tablespace TBS_JXKH_LOG
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
minextents 1
maxextents unlimited
);
修改表空间即可
1,复制表结构: create table a as select * from b where 1=2;
2,复制表和数据:create table a as select * From b ;
3,移动表所属的表空间:alter table a move tablespace 表空间名;
as
select * from table1
tablespace 表空间B;
则可以
create table A.C as select * from B.C