USE

Switch the database context to the specified database or database snapshot.

Syntax:
      USE database

When a SQL Server login connects, the login is automatically connected to its default database.

Example

USE AdventureWorks;
GO

"Eventually, all things merge into one, and a river runs through it. The river was cut by the world's great flood and runs over rocks from the basement of time. On some of the rocks are timeless raindrops. Under the rocks are the words, and some of the words are theirs. I am haunted by waters" - Norman Maclean

Related commands:

CREATE DATABASE
Equivalent Oracle command: CONNECT


© Copyright SS64.com 1999-2014
Some rights reserved