COPY
COPY {FROM connection | TO connection} {APPEND | CREATE | INSERT | REPLACE} destination_table [(column_list)] USING select_statement
The COPY command allows you to use SQL*Plus as a conduit for transferring data between two Oracle databases. For example:
copy from jeff/bigkid@empdb - create emp_names (id, name) - USING SELECT employee_id, employee_name - FROM employee
Specifies either the target or the source database. You must be connected to one database. Use this clause to specify the other.
Is the login information to use when connecting to the other database. This must be in the typical username/password@connect_string format.
Causes SQL*Plus to insert the copied rows into the destination table. If necessary, SQL*Plus will create the destination table first.
Causes SQL*Plus to copy the data only if the destination table is a new table.
Causes SQL*Plus to insert the copied rows into the destination table only if it already exists.
Causes SQL*Plus to delete and recreate the destination table if it currently exists.
Is the name of the table to which you want to copy the data.
Specifies column names to use when the COPY command creates a new destination table. This is a comma-delimited list, and the number of column names must match the number of columns in the SELECT statement.
Is a SELECT statement that returns the data you want to COPY.