Oracle7 Server SQL Reference

Contents Index Home Previous Next

DECLARE DATABASE (Embedded SQL)

Purpose

To declare an identifier for a non-default database to be accessed in subsequent embedded SQL statements.

Prerequisites

You must have access to a username on the non-default database.

Syntax

Keywords and Parameters

db_name

is the identifier established for the non-default database.

Usage Notes

You declare a db_name for a non-default database so that other embedded SQL statements can refer to that database using the AT clause. Before issuing a CONNECT statement with an AT clause, you must declare a db_name for the non-default database with a DECLARE DATABASE statement.

For more information on this command, see Programmer's Guide to the Oracle Precompilers.

Example

This example illustrates the use of a DECLARE DATABASE statement:

EXEC SQL DECLARE oracle3 DATABASE 

Related Topics

COMMIT command [*] CONNECT command [*] DECLARE CURSOR command [*] DECLARE STATEMENT command [*] DELETE command [*] EXECUTE command [*] EXECUTE IMMEDIATE command [*] INSERT command [*] SELECT command [*] UPDATE command [*]


Contents Index Home Previous Next