Choosing a database: use

The use command lets you access an existing database. Its syntax is:

use database_name 

For example, to access the pubs2 database, type:

use pubs2 

This command allows you to access the pubs2 database only if you are a known user in pubs2. Otherwise, you see an error message.

It is likely that you will be automatically connected to the master database when you log in to Adaptive Server, so if you want to use another database, issue the use command. You or a System Administrator can change the database to which you initially connect by using sp_modifylogin. Only a System Administrator can change the default database for another user.