Selecting a Database


Visually Selecting a Database

 To visually select a database and make it the current, in the SQL Designer toolbar, click the arrow of the Available Databases combo box and select the desired database:

Available Databases

Selecting a Database With SQL Code

To programmatically specify the current database, in a Query Editor or using the SQLCMD utility (including PowerShell) at the Command Prompt, type the USE keyword followed by the name of the database. The formula to use is:

USE DatabaseName;

Here is an example:

USE Exercise;

  Copyright © 2008-2013 FunctionX