Home
Main Menu
Home
Help Docs
Newbies
Corporates
Gnu/Linux Distros
Programming
Databases
Links
Search
Regular
News
Interviews
Aaj Ka Tip
Aaj Ka Command
Community
Blogs
Wiki
Forums
Services
Free Software
Latest
Popular
Who's Online
We have 106 guests online

How to use the copy command in Oracle SQL Print E-mail

How to use the copy command in Oracle SQL

Syntax:

COPY {FROM database | TO database | FROM database TO database} {APPEND|CREATE|INSERT|REPLACE} destination_table [(column, column, column, ...)]
USING query

where database has the following syntax:

username[/password]@connect_identifier

Copies data from a query to a table in a local or remote database. COPY supports the following datatypes:

    CHAR
    DATE
    LONG
    NUMBER
    VARCHAR2

Examples

----To copy a table from schema-name1 to schema-name2

COPY FROM schema1/service1  TO schema2/service2 CREATE table_name USING select * from table_name;

----To append a table from schema-name1 to schema-name2

COPY FROM schema1/service1 append appldata using select * from appldata;
 
----To insert into table from schema-name1 to schema-name2

COPY FROM schema1/service1  TO schema2/service2 insert into table_name using select * from table_name;


Refer to this article for seeing Copy Command Demonstrations.
http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a90842/apb.htm

Author:Pratibha

< Previous   Next >



Polls
Have you visited this site earlier?
  
gnulinuxclub
Join Us
About Us
Contact Us
Support Us
Acknowlegdement
Login(only for dev.)

Royalty Free Images

O'Reilly User Group discount!




Powered By GIMP GIMP
Contact Webmaster Copyleft 2011 gnulinuxclub.org