Urian
Jul 4 2008, 02:57 AM
As some of you understood I'm new on oracle
I need to do an insert, I want to copy the data of a table A from a schema X to another table A on a schema Y
The structure of the tables is the same.
something like
insert into Table Y.A values
(select * from Table X.A)
Littlewheat
Jul 4 2008, 03:15 AM
Hi Urian,
use
insert into shema_A.table_X
(select * from schema_B.table_Y)
SteveC
Jul 4 2008, 09:32 AM
This assumes the target table already exists in A.
To create the table in A from B with no data (add a condition that cannot be met):
create table A.X as select * from B.X
where 1=2;
Or, to create and insert/populate at the same time, omit the where clause:
create table A.X as select * from B.X;
aussie_dba
Jul 4 2008, 10:36 AM
" I want to copy the data of a table A from a schema X to another table A on a schema Y"
Use Create Tbale as Select (CTAS)
http://www.dba-oracle.com/t_create_table_select_ctas.htm