SQL*Plus User's Guide and Reference
Release 8.1.5

A66736-01

Library

Product

Contents

Index

Prev Up Next

Accessing SQL Databases, 5 of 5


Copying Data between Tables on One Database

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


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index