COPY {FROM database | TO database | FROM database TO database} {APPEND|CREATE|INSERT|REPLACE} [destTableName] { (column) } USING select-statement
append
: Append the selected rows to an existing table, or create a table and insert the rows if the table does not exist
create
: Create the destination table and insert the selected rows - fails if table already exists
insert
: Insert the selected rows into the destination table - fails if table does not exist
replace
: deletes (truncates?) rows in destination table before inserting selected rows. If table does not exist, it is created. clob
or blob
!) results in the error message CPY-0012: Datatype cannot be copied. arraysize
specifies the number of rows that SQL*Plus fetches from the source data base and copies to the destination database. copycommit
can be set in which case each batch (of size arraysize
) will be commited. append
operations or insert
operations with an already existing table, the number of selected columns must correspond to the number of columns in the select statement after the using
clause, otherwise SQL*Plus throws a CPY-0007 error.