SQL$HELP72.HLB  —  ATTACH  Arguments  ALIAS alias
    A part of the attach expression that specifies a name for the
    attach to the database. Specifying an alias lets your program or
    interactive SQL statements refer to more than one database.

    You do not have to specify an alias in the ATTACH statement.
    The default alias in interactive SQL and in precompiled programs
    is RDB$DBHANDLE. In the SQL module language, the default is the
    alias specified in the module header. Using the default alias
    (either by specifying it explicitly in the ATTACH statement or
    by omitting any alias) makes the database part of the default
    environment. Specifying a default database means that statements
    that refer to that database do not need to use an alias.

    If a default alias was already declared, and you specify the
    default alias in the alias clause (or specify any alias that
    was already declared), interactive SQL issues an informational
    message.

    In the following example, TESTDB is the first database attached
    and uses the default alias. When no alias is specified for the
    second database attached, SQL tries to assign it the default
    alias but finds that the default alias is already declared.

    SQL> ATTACH 'FILENAME testdb';
    SQL> ATTACH 'FILENAME otherdb';
    This alias has already been declared.
    Would you like to override this declaration (No)? N
    SQL-F-DEFDBDEC, A database has already been declared with the default alias
    SQL> SHOW DATABASES;
    Default alias:
        Oracle Rdb database in file testdb
    SQL> ATTACH 'FILENAME otherdb';
    This alias has already been declared.
    Would you like to override this declaration (No)? Y
    SQL> SHOW DATABASES;
    Default alias:
        Oracle Rdb database in file otherdb
Close Help