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.

Examples

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 © 1999-2024 SS64.com
Some rights reserved