SQL*Plus Quick Reference
Release 8.1.5

A66735-01

Library

Product

Prev Up Next

SQL*Plus Quick Reference, 7 of 10


Accessing Databases

Use the following commands to access and copy data between tables on different databases.

CONN[ECT] [[logon] [AS [SYSOPER|SYSDBA]]]

      where logon requires the following syntax:

      username[/password] [@net_service_name]|/
      
      
      

      Connects a given username to Oracle. If you omit net_service_name, connects you to the default database. If you omit username and/or password, SQL*Plus prompts you for them. CONNECT followed by a slash (/) connects you using a default (OPS$) logon.

DISC[ONNECT]

      Commits pending changes to the database and logs the current username off Oracle, but does not exit SQL*Plus.

COPY {FROM username[/password]@net_service_name
|TO username[/password]@net_service_name
|FROM username[/password]@net_service_name
TO
username[/password]@net_service_name} {APPEND|CREATE|INSERT|REPLACE} destination_table
[(
column, column ...)] USING query

      Copies data from one Oracle database to a table in another. APPEND, CREATE, INSERT or REPLACE specifies how COPY treats the existing copy of the destination table (if it exists). USING query identifies the source table and determines which rows and columns COPY copies from it.

PASSW[ORD] [username]

      Allows you to change a password without echoing the password on an input device.


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product