COPY |
COPY {FROM username[/password][@hostname] | TO username[/password]@hostname] | FROM username[/password][@hostname] TO username[/password][@hostname]} {APPEND | CREATE | INSERT | REPLACE} destination_table [(column[,column . . .])] USING query) |
Copies data returned from a query to another table in either the local or remote database.
Keywords
username
The name of the user account (schema) from and/or to which data will be copied.
password
The password associated with the specified user account.
hostname
The SQL*Net or Net8 connect string for the database being connected to.
FROM
Specifies the username, password, and hostname for the database from which data will be copied. If omitted, the account SQL*Plus is currently logged into will be used.
TO
Specifies the username, password, and hostname for the database to which data will be copied. If omitted, the account SQL*Plus is currently logged into will be used.
APPEND
Causes rows to be inserted into destination_table if it exists; otherwise, destination_table is created.
CREATE
Creates destination_table before inserting rows. If destination_table already exists, an error results.
INSERT
Causes rows to be inserted into destination_table. If the table does not exist, an error results.
REPLACE
Causes destination_table to be deleted, if it exists, and a new version created before rows are copied.
destination_table
The name of the table that will receive the rows being copied.
column
The name of a column in destination_table where ...
Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.