32.1. Sessions

The concept of a user session involves the user first connecting to the database. This is like dialing a phone number, but with a password, to get to the database. The Standard SQL syntax for this statement is:

CONNECT TO <connection target>

<connection target> ::=
  <SQL-server name>
    [AS <connection name>]
    [USER <user name>]
| DEFAULT

However, you will find many differences in various vendors’ SQL products and perhaps in operating system–level login procedures that have to be followed.

Once the connection is established, the user has access to all the parts of the database to which he has been granted privileges. During this session, he can execute zero or more transactions. As one user inserts, updates, and deletes rows in the ...

Get Joe Celko's SQL for Smarties, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.