SQL2003 Syntax

Keywords

DEFAULT

Initiates a default session with the server where the user
authorization is the default and the current database is the default.
The standard specifies that CONNECT TO DEFAULT
is issued implicitly if you start a SQL session without first issuing
a CONNECT statement.

server_name

Establishes a connection to a named server. The
server_name may be a string literal
enclosed in single-quotes or a host variable.

AS connection_name

Establishes a connection with the name
connection_name shown in single-quotes.
The optional connection_name may be a
string literal enclosed in single quotes or a host variable. It is
optional only for the first connection attached to a server. All
subsequent sessions must include the AS clause.
This is useful for telling user connections apart when many users,
perhaps even a single user, have many open sessions on a given
server_name.

USER user_name

Establishes a connection to the named server under the
user_name specified.

Rules at a Glance

Issue the CONNECT statement to open an
interactive SQL session with a DBMS. The period between issuing the
CONNECT and DISCONNECT statements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, interactive tutorials, and more.