Help - Search - Members - Calendar
Full Version: Insert on Oracle
Oracle DBA Forums > Oracle > Oracle Forum
Urian
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
Hi Urian,
use

insert into shema_A.table_X
(select * from schema_B.table_Y)
Urian
Thanks a lot.
SteveC
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
" 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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.