Download SQL*Plus User`s Guide and Reference

Transcript
COPY
Purpose
Copies the data from a query to a table in a local or remote database.
Syntax
COPY {FROM username[/password]@database_specification|
TO username[/password]@database_specification|
FROM username[/password]@database_specification
TO username[/password]@database_specification}
{APPEND|CREATE|INSERT|REPLACE} destination_table
[(column, column, column ...)] USING query
Terms and Clauses
Refer to the following list for a description of each term or clause:
username[/password]
Represent the Oracle username/password you wish to
COPY FROM and TO. In the FROM clause,
username/password identifies the source of the data;
in the TO clause, username/password identifies the
destination. If you do not specify password in either
the FROM clause or the TO clause, SQL*Plus will
prompt you for it. SQL*Plus suppresses the display
of your response to these prompts.
database_specification
Consists of a SQL*Net connection string. You must
include a database_specification clause in the COPY
command. In the FROM clause,
database_specification represents the database at the
source; in the TO clause, database_specification
represents the database at the destination. The
exact syntax depends upon the SQL*Net
communications protocol your Oracle installation
uses. For more information, refer to the SQL*Net
manual appropriate for your protocol or contact
your DBA.
destination_table
Represents the table you wish to create or to which
you wish to add data.
(column, column, column, ...)
Specifies the names of the columns in
destination_table. You must enclose a name in
double quotes if it contains lowercase letters or
blanks.
Command Reference
6–41