SQL*Plus User's Guide and Reference Release 8.1.6 A75664-01 |
|
Accessing SQL Databases, 5 of 5
You can copy data from one table to another in a single database (local or remote). To copy between tables in your local database, specify your own username and password and the service name for your local database in either a FROM or a TO clause (omit the other clause):
SQL> COPY FROM SCOTT/TIGER@MYDATABASE - > INSERT EMPCOPY2 - > USING SELECT * FROM EMP
To copy between tables on a remote database, include the same username, password, and service name in the FROM and TO clauses:
SQL> COPY FROM SCOTT/TIGER@BOSTONDB - > TO SCOTT/TIGER@BOSTONDB - > INSERT EMPCOPY2 - > USING SELECT * FROM EMP
|
![]() Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|