Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import oracle tables!

Status
Not open for further replies.

pappetta

IS-IT--Management
Jul 11, 2001
11
IT
Dear all,
can I import data from one oracle table "table_STO" to another table (with different name) "table_FUN" and How could I perform it?
Thanks in advance!
 
Hi,

Lot of ways.

1. Write a plsql procedure to read from one table to write to another.
2. Export from source table to a flat file and use sqlloader to load it into target table.
3. Use a tool like TOAD to create sql statements from the source table, modify the result by changing the name of the table and execute it.

Hope this helps
 
If you definitely want to do this using import, the easiest way is to import the table with the old name, then use "alter table" to rename the table to the new name.
 

Another way is via sqlplus copy command:

copy from scott/password@db1 create table_FUN using select * from table_STO
Robbie

"The rule is, not to besiege walled cities if it can possibly be avoided" -- Art of War
 

Or you can create it as:

create table table_FUN as select * from table_STO;

If your tables are on different databases, you may use a database link:

create database link mydb connect to myuser identified by mypassword using mydb;
(where mydb is an alias on your server tnsnames.ora)

then
create table table_FUN as select * from table_STO@mydb;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top